本文整理汇总了PHP中generateUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP generateUrl函数的具体用法?PHP generateUrl怎么用?PHP generateUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generateUrl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: extractRedirect
function extractRedirect()
{
if (isset($_POST['redirect'])) {
return $_POST['redirect'];
}
$redirect = isset($_GET['redirect']) ? $_GET['redirect'] : '';
$redirect = trim($redirect);
if (strlen($redirect) < 1) {
return '';
}
if (strpos($redirect, '#') || strpos($redirect, '&')) {
return $redirect;
}
if (strpos($redirect, '?') === FALSE) {
return urldecode($redirect);
}
$params = array();
$excluded = array('login', 'logout', 'sid', 'redirect', 'login_success');
foreach ($_GET as $k => $v) {
$k = strtolower($k);
if (in_array($k, $excluded) || in_array($v, $excluded)) {
continue;
}
$params[$k] = $v;
}
return generateUrl(urldecode($redirect), $params);
}
开发者ID:GeniusXalid,项目名称:php-mvc,代码行数:27,代码来源:redirecturl.model.php
示例2: modifierAction
public function modifierAction($id)
{
if ($id === null) {
throw NotFoundHttpException('Article non trouvé ');
}
$message = '';
// entity
$em = $this->getDoctrine()->getManager();
// objet
$article = $em->getRepository('BlogBundle:Article')->find($id);
//$article = new Article();
//form
$form = $this->createForm(new ArticleType(), $article);
$request = $this->get('request');
// condition de validation
if ($request->getMethod() == 'POST') {
// lier le formulaire et la requete
$form->bind($request);
// vérification de la validité des données
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($article);
$em->flush();
$message = 'Article bien enrégistré';
return $this->redirect(generateUrl('BlogBundle:Blog:ajouter.html.twig', array('message' => $message, 'form' => $form->createView(), 'article' => $article)));
}
}
return $this->render('BlogBundle:Blog:modifier.html.twig', array('article' => $article, 'form' => $form->createView()));
}
开发者ID:nassafou,项目名称:bweb,代码行数:29,代码来源:BlogController.php
示例3: generateUrl
/**
* generate a valid and not taken URL
* @return string $url if success, call generateUrl (recursif) if url taken
*/
function generateUrl($pdo, $length = 5, $try = 0)
{
// generate a <20 characters (numerical and alphabetical) string, not present in the DB ex: ajf63
if ($try > $length * $length) {
$length += 1;
$try = 0;
}
$pool = 'abcdefghijklmnopqrstuvwxyz0123456789';
$url = '';
for ($i = 0; $i < $length; $i++) {
$url .= $pool[rand(0, strlen($pool) - 1)];
}
try {
$stmt = $pdo->prepare("SELECT id from note where id = :url");
$stmt->bindParam(':url', $url);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
throw $e->getMessage();
}
if (empty($result)) {
// la requete n'a rien renvoyé donc url pas prise
return $url;
} else {
generateUrl($length, $try + 1);
}
}
开发者ID:gmolveau,项目名称:minote,代码行数:31,代码来源:model_index.php
示例4: testGenerateUrl
public function testGenerateUrl()
{
// null value
$this->assertEquals(generateUrl(), 'index.php');
// empty value
$this->assertEquals(generateUrl(''), 'index.php');
// credible value
$this->assertEquals(generateUrl("abcd"), 'index.php?p=abcd');
}
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:9,代码来源:routingTest.php
示例5: LoadInlineMenu
/**
* @return array
*/
function LoadInlineMenu($SqlConnection, $PageID)
{
$sql = "SELECT inlinemenu_html, inlinemenu_image, inlinemenu_image_thumb, inlinemenu_image_title\r\n\t\t\t\tFROM " . DB_PREFIX . "inlinemenu\r\n\t\t\t\tWHERE page_id = {$PageID}";
$inlinemenu_result = $SqlConnection->SqlQuery($sql);
$replacements = array();
if ($inlinemenu = mysql_fetch_object($inlinemenu_result)) {
if ($inlinemenu->inlinemenu_html != '' || $inlinemenu->inlinemenu_image_thumb != '') {
$replacements['INLINEMENU_TEXT'] = $inlinemenu->inlinemenu_html;
$imageString = '';
if (file_exists($inlinemenu->inlinemenu_image_thumb)) {
list($imageWidth, $imageHeight) = getimagesize($inlinemenu->inlinemenu_image_thumb);
$imageString = "<div class=\"thumb\">\r\n\t<img width=\"{$imageWidth}\" height=\"{$imageHeight}\"src=\"" . generateUrl($inlinemenu->inlinemenu_image_thumb) . "\" title=\"{$inlinemenu->inlinemenu_image_title}\" alt=\"{$inlinemenu->inlinemenu_image_title}\" />\r\n\t<div class=\"description\" title=\"{$inlinemenu->inlinemenu_image_title}\">\r\n\t\t<div class=\"magnify\">\r\n\t\t\t<a href=\"special.php?page=image&file=" . generateUrl(basename($inlinemenu->inlinemenu_image)) . "\" title=\"vergrößern\">\r\n\t\t\t\t<img src=\"img/magnify.png\" title=\"vergrößern\" alt=\"vergrößern\"/>\r\n\t\t\t</a>\r\n\t\t</div>{$inlinemenu->inlinemenu_image_title}\r\n\t</div>\r\n</div>";
}
$replacements['INLINEMENU_IMAGE'] = $imageString;
}
}
return $replacements;
}
开发者ID:BackupTheBerlios,项目名称:comacms-svn,代码行数:21,代码来源:inlinemenu.php
示例6: GetPostOrGet
$text = 'Die Seite wurde leider gelöscht. <br />
Falls die Seite dennoch da sein müsste, melden sie sich bitte beim Seitenbetreiber.';
break;
case 'image':
$imageID = GetPostOrGet('id');
$imageFile = GetPostOrGet('file');
if (is_numeric($imageID) || !empty($imageFile)) {
$title = 'Bild';
$condition = 'file_id = ' . $imageID;
if (empty($imageID)) {
$condition = "file_name = '{$imageFile}'";
}
$sql = "SELECT *\r\n\t\t\t\t\tFROM " . DB_PREFIX . "files\r\n\t\t\t\t\tWHERE {$condition}\r\n\t\t\t\t\tLIMIT 1";
$imageResult = $sqlConnection->SqlQuery($sql);
if ($imageData = mysql_fetch_object($imageResult)) {
$text = "<img src=\"" . generateUrl($imageData->file_path) . "\" class=\"pureimage\"/>";
}
}
break;
case 'module':
// Get the name of Module to show
$moduleName = GetPostOrGet('moduleName');
if (file_exists('./modules/' . $moduleName . '/' . $moduleName . '_module.php')) {
include_once './modules/' . $moduleName . '/' . $moduleName . '_module.php';
}
// If the menu is activated it's class should be created
// check if the module-class is already created
if (!isset(${$moduleName})) {
// is the module-class available?
if (class_exists('Module_' . $moduleName)) {
// create a link to the initialisation-function for the module-class
开发者ID:BackupTheBerlios,项目名称:comacms-svn,代码行数:31,代码来源:special.php
示例7: editerAction
public function editerAction($id = null)
{
// vérification de la validité de l'id
if (!isset($id)) {
//on crée un nouvel acteur
$acteur = new Acteur();
// l'id est null: soit c'est un formulaire vide soit elle a des requete
$em = $this->getDoctrine()->getManager();
//On exécute l'ajout de formulaire
$form = $this->createForm(new ActeurType(), $acteur);
// on recuper la requette en cours
$request = $this->get('request');
//vérifier
if ($request->getMethod() == 'POST') {
$form->bind('request');
if ($form->isValid()) {
$em->persist($acteur);
$em->flush();
return $this->redirect(generateUrl('acteur_list'));
}
}
// s'il n'y a pas de requette donc c'est get
return $this->render('FilmothequeBundle:Acteur:ajouter.html.twig', array('form' => $form->createView()));
} else {
//si le id est valide donc nous sommes dans le cas de la modification
$em = $this->getDoctrine()->getManager();
//il faut recuperer l'id de l'utisateur
$acteur = $em->getRepository('FilmothequeBundle:Acteur')->find($id);
//on recupere les l'id del'acteur du repository
$form = $this->createForm(new ActeurType(), $acteur);
// on requepere la requette
$request = $this->get('request');
// Condition de validation vérifier si la requete est get ou POST
if ($request->getMethod() == 'POST') {
$form->bind($request);
// si le formulaire est valide
if ($form->isValid()) {
//C'est une donnée a enrégistré
$em->persist($acteur);
$em->flush();
return $this->redirect(generateUrl('acteur_list'));
}
}
// si c'est une requete get on fait le modification
return $this->render('FilmothequeBundle:Acteur:ajouter.html.twig', array('id' => $id, 'form' => $form->createView()));
}
}
开发者ID:nassafou,项目名称:Filmotheque,代码行数:47,代码来源:ActeurController.php
示例8: MakeImage
//.........这里部分代码省略.........
// go through each parameter
foreach ($parameters as $key => $value) {
// extract the image layout
if (preg_match('~^(' . IMG_DISPLAY_BOX_ONLY . '|' . IMG_DISPLAY_BOX . '|' . IMG_DISPLAY_PICTURE . ')$~', $value)) {
$imageDisplay = $value;
} else {
if (preg_match('~^(thumb|original|big|[0-9]+[Xx][0-9]+|[0-9]+|\\w[0-9]+)$~', $value)) {
$imageSize = $value;
} else {
// its the Title of the picture (it is the last unused parameter)
$imageTitle = $value;
}
}
}
// TODO:
// check if the image isn't saved "local", if it is, download it!
// extern_{$filename}_timestamp.png
// if the file doesn't exists under the given path, try to find it in the database
if (!file_exists($imageUrl)) {
$sql = "SELECT file_path\n\t\t\t\t\t\tFROM " . DB_PREFIX . "files\n\t\t\t\t\t\tWHERE LOWER(file_path) = '" . strtolower($imageUrl) . "'\n\t\t\t\t\t\t\tOR LOWER(file_name) = '" . strtolower(basename($imageUrl)) . "'\n\t\t\t\t\t\tLIMIT 1";
$result = $sqlConnection->SqlQuery($sql);
if ($fileData = mysql_fetch_object($result)) {
$imageUrl = $fileData->file_path;
}
clearstatcache();
// check if the file from the database really exists
if (!file_exists($imageUrl)) {
return "<strong>Bild ("<em>{$imageUrl}</em>") nicht gefunden.</strong>";
}
}
// Resize the image
$image = new ImageConverter($imageUrl);
// convert the 'name-sizes' to 'pixel-sizes'
if ($imageSize == 'thumb') {
$imageSize = 'w180';
} else {
if ($imageSize == 'big') {
$imageSize = '800';
} else {
if ($imageSize == 'original') {
// took the original sizes
$imageWidth = $image->Size[0];
$imageHeight = $image->Size[1];
}
}
}
// 'width-format''
if (preg_match('~^w[0-9]+$~', $imageSize)) {
$imageWidth = substr($imageSize, 1);
// calculate the proporitonal height
$imageHeight = round($image->Size[1] / $image->Size[0] * $imageWidth, 0);
} else {
if (preg_match('~^[0-9]+$~', $imageSize)) {
// look for the longer side and resize it to te given size,
// short the other side proportional to the longer side
$imageWidth = $image->Size[0] > $image->Size[1] ? round($imageSize, 0) : round($image->Size[0] / ($image->Size[1] / $imageSize), 0);
$imageHeight = $image->Size[1] > $image->Size[0] ? round($imageSize, 0) : round($image->Size[1] / ($image->Size[0] / $imageSize), 0);
} else {
if (preg_match('~^([0-9]+)[Xx]([0-9]+)$~', $imageSize, $maches)) {
// took the given sizes
$imageWidth = $maches[1] < $image->Size[0] ? $maches[1] : $image->Size[0];
$imageHeight = $maches[2] < $image->Size[1] ? $maches[2] : $image->Size[1];
}
}
}
$originalUrl = encodeUri($imageUrl);
// str_replace(' ', '%20', basename($imageUrl));
// TODO: don't use the global
global $config;
// check if the image exists already
$thumbnailfolder = $config->Get('thumbnailfolder', 'data/thumbnails/');
if (file_exists($thumbnailfolder . '/' . $imageWidth . 'x' . $imageHeight . '_' . basename($imageUrl))) {
$imageUrl = $thumbnailfolder . '/' . $imageWidth . 'x' . $imageHeight . '_' . basename($imageUrl);
} else {
if ($image->Size[0] >= $imageWidth && $image->Size[1] > $imageHeight || $image->Size[0] > $imageWidth && $image->Size[1] >= $imageHeight) {
$imageUrl = $image->SaveResizedTo($imageWidth, $imageHeight, $thumbnailfolder, $imageWidth . 'x' . $imageHeight . '_');
if ($imageUrl === false) {
return "Not enough memory available!(resize your image!)";
}
} else {
$imageWidth = $image->Size[0];
$imageHeight = $image->Size[1];
}
}
$imageName = generateUrl(basename($image->_file));
$originalUrl = generateUrl($originalUrl);
$imageUrl = generateUrl($imageUrl);
if ($imageDisplay == IMG_DISPLAY_BOX) {
$imageString = "</p>\n\n<div class=\"thumb t" . $ImageAlign . "\">\n\t\t\t\t\t\t<div style=\"width:" . ($imageWidth + 4) . "px\">\n\t\t\t\t\t\t\t<img width=\"{$imageWidth}\" height=\"{$imageHeight}\" src=\"{$imageUrl}\" title=\"{$imageTitle}\" alt=\"{$imageTitle}\" />\n\t\t\t\t\t\t\t<div class=\"description\" title=\"{$imageTitle}\"><div class=\"magnify\"><a href=\"special.php?page=image&file={$imageName}\" title=\"vergrößern\"><img src=\"img/magnify.png\" title=\"vergrößern\" alt=\"vergrößern\"/></a></div>{$imageTitle}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div><p>\n";
} else {
if ($imageDisplay == IMG_DISPLAY_BOX_ONLY) {
$imageString = "</p>\n\n<div class=\"thumb tbox t" . $ImageAlign . "\">\n\t\t\t\t\t\t<div style=\"width:" . ($imageWidth + 4) . "px\">\n\t\t\t\t\t\t\t<img width=\"{$imageWidth}\" height=\"{$imageHeight}\" src=\"{$imageUrl}\" title=\"{$imageTitle}\" alt=\"{$imageTitle}\" />\n\t\t\t\t\t\t\t<div class=\"magnify\"><a href=\"special.php?page=image&file={$imageName}\" title=\"vergrößern\"><img src=\"img/magnify.png\" title=\"vergrößern\" alt=\"vergrößern\"/></a></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n<p>";
} else {
if ($imageDisplay == IMG_DISPLAY_PICTURE) {
$imageString = "</p>\n\n<div class=\"thumb tbox t" . $ImageAlign . "\">\n\t\t\t\t\t<img width=\"{$imageWidth}\" height=\"{$imageHeight}\" src=\"{$imageUrl}\" title=\"{$imageTitle}\" alt=\"{$imageTitle}\" />\n\t\t\t\t\t</div><p>";
}
}
}
return "{$imageString}";
}
开发者ID:BackupTheBerlios,项目名称:comacms-svn,代码行数:101,代码来源:textactions.php
示例9: generateUrl
<?php
//given vars: $total $todo $inprogress $done
?>
<div class="count-stats">
<a href="<?php
echo generateUrl('listTask');
?>
">
<div class="row text-center">
<div class="count total col-lg-12 container">
<p><?php
echo _t("TOTAL");
?>
<strong><?php
echo $total;
?>
</strong></p>
</div>
</div>
<div class="row text-center">
<div class="count todo col-lg-4 container">
<p><?php
echo _t("TODOLIST");
?>
<strong><?php
echo $todo;
?>
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:31,代码来源:homepage.php
示例10: editerAction
public function editerAction($id = null)
{
// vérification de l'existance de l'id
if (isset($id)) {
// existance de l'id donc on procede a la modification
$em = $this->getDoctrine()->getManager();
// création du formulaire
$form = $this->createForm(new FilmType(), $film);
//recupếration de l'id du repository
$film = $em->getRepository('FilmothequeBundle:Film')->find($id);
// vérification de la requete
$request = $this->get('request');
// vérification si la requete est get ou post
if ($request->getMethod() == 'POST') {
//on lie le formulaire et la requete
$form->bind($request);
// vérification de la validité du formulaire
if ($request->isValid()) {
//on persist
$em->persist($film);
//on flush
$em->flush();
// on fait une redirection
return $this->rediect($this->generateUrl('film_list'));
}
}
return $this->render('FilmothequeBundle:Film:ajouter.html.twig', array('form' => $form->createView(), 'id' => $id));
} else {
// id inexistant
$em = $this->getDoctrine()->getManager();
//instantiation d'un objet
$film = new Film();
//création d'un formulaire
$form = $this->createForm(new FilmType(), $film);
// vérification de la requete
$request->get('request');
//vérification si c'est un get ou post
if ($request->getMehod() == 'POST') {
// on lie le formulaire et la requete
$form->bind($request);
// vérification de la validité du formulaire
if ($form->isValid()) {
$em->persist($film);
// on flush
$em->flush();
// redirection vers les vues liste
return $this->redirect(generateUrl('film_list'));
}
}
return $this->render('FilmothequeBundle:Film:ajouter.html.twig', array('form' => $form->createView()));
}
}
开发者ID:nassafou,项目名称:Filmotheque,代码行数:52,代码来源:FilmController.php
示例11: _t
<h3> <?php
echo _t("EDITTASK");
?>
</h3>
<?php
if ($formError) {
?>
<strong>Bad submit!</strong>
<?php
}
?>
<form class="task-form" action="<?php
echo generateUrl('updateTask') . "&id=" . $id;
?>
" method="post">
<!-- Form -->
<?php
include "views/components/taskForm.php";
?>
<input type="submit" class="btn btn-success" name="submit" value="<?php
echo _t("VALIDATE");
?>
" />
</form>
</div>
<div class="col-md-3">
</div>
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:31,代码来源:updateTaskForm.php
示例12: _setImage
/**
* @access private
* @return sring
*/
function _setImage($article_id)
{
if (!is_numeric($article_id)) {
return $this->_homePage();
}
$sql = "SELECT *\r\n\t\t\t\tFROM " . DB_PREFIX . "articles\r\n\t\t\t\tWHERE article_id={$article_id}";
$article_result = $this->_SqlConnection->SqlQuery($sql);
if ($article = mysql_fetch_object($article_result)) {
$out = '';
$sql = "SELECT file_path\r\n\t\t\t\t\tFROM " . DB_PREFIX . "files\r\n\t\t\t\t\tWHERE file_type LIKE 'image/%'\r\n\t\t\t\t\tORDER BY file_name ASC";
$images_result = $this->_SqlConnection->SqlQuery($sql);
$imgmax = 100;
$imgmax2 = 100;
$thumbnailfolder = 'data/thumbnails/';
$out .= "<form action=\"admin.php\" method=\"post\"><div class=\"imagesblock\">\r\n\t\t\t\t<input type=\"hidden\" name=\"page\" value=\"module_articles\"/>\r\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"saveImage\"/>\r\n\t\t\t\t<input type=\"hidden\" name=\"article_id\" value=\"{$article_id}\"/>";
while ($imageData = mysql_fetch_object($images_result)) {
$imageUrl = $imageData->file_path;
if (file_exists($imageUrl)) {
$image = new ImageConverter($imageUrl);
$size = $image->CalcSizeByMax($imgmax);
$resizedFileName = $thumbnailfolder . '/' . $size[0] . 'x' . $size[1] . '_' . basename($imageUrl);
if (!file_exists($resizedFileName)) {
$resizedFileName = $image->SaveResizedTo($size[0], $size[1], $thumbnailfolder, $size[0] . 'x' . $size[1] . '_');
}
if (file_exists($resizedFileName) && $resizedFileName !== false) {
$margin_top = round(($imgmax - $size[1]) / 2);
$margin_bottom = $imgmax - $size[1] - $margin_top;
$out .= "<div class=\"imageblock\">\r\n\t\t\t\t\t\t\t<a href=\"" . generateUrl($resizedFileName) . "\">\r\n\t\t\t\t\t\t\t<img style=\"margin-top:" . $margin_top . "px;margin-bottom:" . $margin_bottom . "px;width:" . $size[0] . "px;height:" . $size[1] . "px;\" src=\"" . generateUrl($resizedFileName) . "\" alt=\"" . basename($imageData->file_path) . "\" /></a><br />\r\n\t\t\t\t\t\t<input type=\"radio\" name=\"image_path\" " . ($article->article_image == $imageData->file_path ? 'checked="checked" ' : '') . " value=\"" . $imageData->file_path . "\"/></div>";
}
}
}
$out .= "</div><input type=\"submit\" value=\"" . $this->_Translation->GetTranslation('apply') . "\" class=\"button\"/><a href=\"admin.php?page=module_articles&action=edit&article_id={$article_id}\" class=\"button\">" . $this->_Translation->GetTranslation('back') . "</a></form>";
return $out;
}
}
开发者ID:BackupTheBerlios,项目名称:comacms-svn,代码行数:39,代码来源:articles_admin.php
示例13: _t
<div id="loginModal" class="modal show" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="text-center">ZZTasks - <?php
echo _t("LOGIN");
?>
</h1>
</div>
<div class="modal-body">
<form class="form col-md-12 center-block" action="<?php
echo generateUrl('login');
?>
" method="post">
<div class="form-group">
<input type="text" name="login" class="form-control input-lg" placeholder="<?php
echo _t("USERLOGIN");
?>
" value="<?php
echo getUsername();
?>
" required />
</div>
<div class="form-group">
<input type="password" name="password" class="form-control input-lg" placeholder="<?php
echo _t("USERPASSWORD");
?>
" required />
</div>
<div class="form-group">
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:30,代码来源:loginForm.php
示例14: printPageWithoutFooter
/**
* Prints the whole page including form but without the footer.
* Call this function, then call chmodRecursively() which will output some HTML,
* and finally call printFooter();
*/
function printPageWithoutFooter($plugins, $path, $filePermissions, $folderPermissions, $permissionBitSets)
{
global $baseUrl;
?>
<html>
<head>
<title>Gallery Support - Change Filesystem Permissions</title>
<link rel="stylesheet" type="text/css" href="<?php
print $baseUrl;
?>
support.css"/>
<style type="text/css">
</style>
<script type="text/javascript">
var plugins = new Array();
<?php
foreach ($plugins as $pluginId => $isOpenForEdit) {
print "plugins['{$pluginId}'] = {$isOpenForEdit};\n ";
}
?>
function setEditOrSecure(pluginId, formObj) {
if (pluginId == -1) {
formObj.mode.value='';
formObj.open.disabled = true;
formObj.secure.disabled = true;
} else if (plugins[pluginId]) {
formObj.mode.value='secure';
formObj.open.disabled = true;
formObj.secure.disabled = false;
} else {
formObj.mode.value='open';
formObj.open.disabled = false;
formObj.secure.disabled = true;
}
}
function printStatusMessage(message) {
var statusElement = document.getElementById('status');
statusElement.innerHTML = message + "<a href=\"#details\">[details]</a>";
statusElement.style.display = 'block';
}
function printErrorMessage(message) {
var errorElement = document.getElementById('error');
errorElement.innerHTML = message +
"<br/>Note: Please look at the <a href=\"#details\">[details]</a>. " +
"You might be able to change the filesystem permissions of the failed directories " +
"successfully yourself with an FTP program or a command line shell."
errorElement.style.display = 'block';
}
</script>
</head>
<body>
<div id="content">
<div id="title">
<a href="../../">Gallery</a> »
<a href="<?php
generateUrl('index.php');
?>
">Support</a> »
Change Filesystem Permissions
</div>
<h2>
This tool lets you change the filesystem permissions of files and folders owned
by the webserver.
</h2>
<p>
All files and folders in your Gallery storage folder are owned by the
webserver. If you installed Gallery2 by unpacking a .zip or .tar.gz file, then the
gallery2 folder is probably owned by you which means that you can edit the files
directly. However, if you used the preinstaller then your gallery2 directory is
also owned by the webserver. For more information, see the <b><a
href="http://codex.gallery2.org/Gallery2:Security">Gallery Security Guide</a>.</b>
</p>
<!-- Identifyable placeholders such that we can insert our messages during runtime via JS. -->
<div id="error" class="error" style="display: none;">
</div>
<div id="status" class="success" style="display: none;">
</div>
<hr class="faint"/>
<?php
if (!isModulesOrThemesDirWriteable()) {
?>
<h2>
<a href="<?php
generateUrl('index.php?chmod&command=' . CMD_CHMOD_MODULES_AND_THEMES_DIR . '&mode=open');
?>
//.........这里部分代码省略.........
开发者ID:justinlyon,项目名称:scc,代码行数:101,代码来源:chmod.php
示例15: makeurl
/**
* @NoAdminRequired
*/
public function makeurl()
{
require_once 'shorten/lib/makeurl.php';
return generateUrl();
}
开发者ID:stevenmirabito,项目名称:shorten,代码行数:8,代码来源:shortenapicontroller.php
示例16: generateUrl
?>
&lang=<?php
echo $value;
?>
"><img src="img/flags/<?php
echo $value;
?>
.png"/></a></li>
<?php
}
?>
</ul>
</li>
<li>
<a href="<?php
echo generateUrl('logout');
?>
">
<i class="glyphicon glyphicon-log-out"></i> <?php
echo _t("LOGOUT");
?>
</a>
</li>
</ul>
</nav>
</div>
</header>
<!-- /Navbar -->
<div id="masthead">
<div class="container">
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:31,代码来源:header.php
示例17: generateUrl
<hr class="faint" />
<h2>
<a href="<?php
generateUrl('index.php?gd');
?>
">GD</a>
</h2>
<p class="description">
Information about your GD configuration
</p>
<hr class="faint" />
<h2>
<a href="<?php
generateUrl('index.php?import');
?>
">Import Database</a>
</h2>
<p class="description">
Restore your Gallery database from an export that was made from the site administration
maintenance screen or from the Database Backup step of the Gallery upgrader.
</p>
<hr class="faint" />
<h2>
<?php
require_once '../../embed.php';
$ret = GalleryEmbed::init(array('fullInit' => false, 'noDatabase' => true));
/* Ignore error */
$url = GalleryUrlGenerator::appendParamsToUrl('../../' . GALLERY_MAIN_PHP, array('view' => 'core.UserAdmin', 'subView' => 'core.UserRecoverPasswordAdmin'));
开发者ID:justinlyon,项目名称:scc,代码行数:31,代码来源:index.php
示例18: _t
<p>
"<?php
echo $value["title"];
?>
" <?php
echo _t("OF");
?>
<strong><cite><?php
echo $value["owner"];
?>
</cite></strong>
</p>
</blockquote>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?php
echo _t("CANCEL");
?>
</button>
<a class="btn btn-danger btn-ok" href="<?php
echo generateUrl('deleteTask') . '&id=' . $key;
?>
"> <?php
echo _t("DELETE");
?>
</a>
</div>
</div>
</div>
</div>
开发者ID:vmizoules,项目名称:ZZTasksPHP,代码行数:30,代码来源:task.php
示例19: _EditPageOverview
function _EditPageOverview($PageID)
{
if (!is_numeric($PageID)) {
return false;
}
$this->_ComaLate->SetReplacement('LANG_TITLE', $this->_Translation->GetTranslation('title'));
$this->_ComaLate->SetReplacement('LANG_EDIT_GALLERY', $this->_Translation->GetTranslation('edit_gallery'));
$this->_ComaLate->SetReplacement('LANG_TITLE_INFO', $this->_Translation->GetTranslation('the_title_is_someting_like_a_headline_of_the_page'));
$this->_ComaLate->SetReplacement('LANG_APPLY', $this->_Translation->GetTranslation('apply'));
$this->_ComaLate->SetReplacement('LANG_BACK', $this->_Translation->GetTranslation('back'));
$this->_ComaLate->SetReplacement('LANG_REGENERATE_THUMBNAILS', $this->_Translation->GetTranslation('regenerate_thumbnails'));
$this->_ComaLate->SetReplacement('LANG_ADD_IMAGES', $this->_Translation->GetTranslation('add_images'));
$this->_ComaLate->SetReplacement('LANG_GALLERY', $this->_Translation->GetTranslation('gallery'));
$this->_ComaLate->SetReplacement('LANG_IMAGE', $this->_Translation->GetTranslation('image'));
$this->_ComaLate->SetReplacement('PAGE_ID', $PageID);
$this->_ComaLate->SetReplacement('LANG_MOVE_UP', $this->_Translation->GetTranslation('move_up'));
$this->_ComaLate->SetReplacement('LANG_MOVE_DOWN', $this->_Translation->GetTranslation('move_down'));
$this->_ComaLate->SetReplacement('LANG_EDIT', $this->_Translation->GetTranslation('edit'));
$this->_ComaLate->SetReplacement('LANG_DELETE', $this->_Translation->GetTranslation('delete'));
// Load the images of the gallery with file-information
$sql = 'SELECT gallery.gallery_file_id, gallery.gallery_image, gallery.gallery_description, gallery.gallery_image_thumbnail, page.page_title
FROM (
(' . DB_PREFIX . 'pages page
LEFT JOIN ' . DB_PREFIX . 'pages_gallery gallery_page
ON page.page_id = gallery_page.page_id)
LEFT JOIN ' . DB_PREFIX . 'gallery gallery
ON gallery_page.gallery_id =gallery.gallery_id)
WHERE page.page_id=' . $PageID . '
ORDER BY gallery.gallery_orderid';
$imagesResult = $this->_SqlConnection->SqlQuery($sql);
$images = array();
$imgmax = 100;
$imageID = 0;
$title = '';
$thumbnailfolder = $this->_Config->Get('thumbnailfolder', 'data/thumbnails/');
while ($image = mysql_fetch_object($imagesResult)) {
if ($title == '') {
$title = $image->page_title;
}
$imageResizer = new ImageConverter($image->gallery_image);
$sizes = $imageResizer->CalcSizeByMax($imgmax);
$gif = '';
if (substr($image->gallery_image, -4) == '.gif') {
$gif = '.png';
}
$prefix = $sizes[0] . 'x' . $sizes[1] . '_';
$fileName = $imageUrl = $thumbnailfolder . '/' . $prefix . basename($image->gallery_image . $gif);
if (!file_exists($fileName)) {
$fileName = $imageResizer->SaveResizedTo($sizes[0], $sizes[1], $thumbnailfolder, $prefix);
}
$marginTop = round(($imgmax - $sizes[1]) / 2);
$marginBottom = $imgmax - $sizes[1] - $marginTop;
if (file_exists($fileName)) {
$images[] = array('IMAGE_TITLE' => $image->gallery_description, 'IMAGE_MARGIN_TOP' => $marginTop, 'IMAGE_MARGIN_BOTTOM' => $marginBottom, 'IMAGE_ID' => $imageID++, 'IMAGE_WIDTH' => $sizes[0], 'IMAGE_HEIGHT' => $sizes[1], 'IMAGE_SRC' => generateUrl($fileName), 'IMAGE_FILE_ID' => $image->gallery_file_id);
}
}
$this->_ComaLate->SetReplacement('IMAGES', $images);
$this->_ComaLate->SetReplacement('PAGE_TITLE', $title);
$template = '<fieldset>
<legend>{LANG_EDIT_GALLERY}</legend>
<form action="{ADMIN_FORM_URL}" method="post">
<input type="hidden" name="{ADMIN_FORM_PAGE}" value="pagestructure" />
<input type="hidden" name="action" value="editPage" />
<input type="hidden" name="action2" value="saveTitle" />
<input type="hidden" name="pageID" value="{PAGE_ID}" />
<div class="row">
<label class="row" for="pageTitle">
<strong>{LANG_TITLE}:</strong>
<span class="info">{LANG_TITLE_INFO}</span>
</label>
<input type="text" name="pageTitle" id="pageTitle" value="{PAGE_TITLE}" />
</div>
<div class="row">
<input type="submit" value="{LANG_APPLY}" class="button" />
</div>
</form>
<div class="row">
<a href="{ADMIN_LINK_URL}page=pagestructure&action=editPage&action2=addNewImageDialog&pageID={PAGE_ID}" class="button">{LANG_ADD_IMAGES}</a>
<a href="{ADMIN_LINK_URL}page=pagestructure&action=editPage&action2=regenerateThumbnails&pageID={PAGE_ID}" class="button">{LANG_REGENERATE_THUMBNAILS}</a>
<a href="{ADMIN_LINK_URL}page=pagestructure" class="button">{LANG_BACK}</a>
</div>
<div class="row">
<IMAGES:loop>
<div class="imageblock">
<a href="index.php?page={PAGE_ID}&imageID={IMAGE_ID}">
<img style="margin-top:{IMAGE_MARGIN_TOP}px;margin-bottom:{IMAGE_MARGIN_BOTTOM}px;width:{IMAGE_WIDTH}px;height:{IMAGE_HEIGHT}px;" src="{IMAGE_SRC}" alt="{LANG_IMAGE}: {IMAGE_TITLE}" title="{IMAGE_TITLE}" />
</a>
<div class="actions">
<a href="{ADMIN_LINK_URL}page=pagestructure&action=editPage&pageID={PAGE_ID}&action2=moveImageUp&imageID={IMAGE_FILE_ID}"><img src="./img/up.png" alt="{LANG_MOVE_UP}" title="{LANG_MOVE_UP}"/></a>
<a href="{ADMIN_LINK_URL}page=pagestructure&action=editPage&pageID={PAGE_ID}&action2=editImage&imageID={IMAGE_FILE_ID}"><img src="./img/edit.png" alt="{LANG_EDIT}" title="{LANG_EDIT}"/></a>
<a href="{ADMIN_LINK_URL}page=pagestructure&action=editPage&pageID={PAGE_ID}&action2=removeImage&imageID={IMAGE_FILE_ID}"><img src="./img/del.png" alt="{LANG_DELETE}" title="{LANG_DELETE}"/></a>
<a href="
|
请发表评论