• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP generateURL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中generateURL函数的典型用法代码示例。如果您正苦于以下问题:PHP generateURL函数的具体用法?PHP generateURL怎么用?PHP generateURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了generateURL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: mediaForm

function mediaForm($form, &$form_state)
{
    global $user;
    $UID = $user->uid;
    $params = drupal_get_query_parameters();
    if (isset($params['MID'])) {
        $MID = $form_state['MID'] = $params['MID'];
    } else {
        if (isset($form_state['MID'])) {
            $MID = $form_state['MID'];
        } else {
            drupal_set_message('No media selected.', 'error');
            return;
        }
    }
    $media = dbGetMedia($MID);
    if (isset($media['OID'])) {
        $form_state['OID'] = $media['OID'];
    }
    $form['fields'] = array('#type' => 'fieldset', '#title' => t('Assign Media'));
    $form['fields']['back'] = array('#prefix' => '<left>', '#limit_validation_errors' => array(), '#submit' => array('backToMedia'), '#type' => 'submit', '#value' => '⇦ Cancel Changes', '#attributes' => array('OnSubmit' => 'if(!confirm("Back?")){return false;}'), '#suffix' => '</left>');
    $form['fields']['title'] = array('#prefix' => '<table id="table-fields"><tr><td>', '#type' => 'textfield', '#title' => t('Media Name'), '#suffix' => '</td>', '#default_value' => $media['title']);
    $form['fields']['picture'] = array('#prefix' => '<td>', '#type' => 'item', '#markup' => '<img src="' . generateURL($media['FID']) . '" style="max-width:200px; width:auto;  height:auto;">', '#suffix' => '</td></tr>');
    $form['fields']['description'] = array('#prefix' => '<tr><td>', '#type' => 'textarea', '#title' => t('Description'), '#suffix' => '</td></tr>', '#default_value' => $media['description']);
    $team = getCurrentTeam();
    $teams = dbGetTeamsForUser($UID);
    $form_state['teams'] = $teams;
    $TID = $team['TID'];
    $form_state['oldTID'] = $TID;
    if (count($teams) != 1) {
        $choices = array();
        foreach ($teams as $userTeam) {
            $choices[$userTeam['TID']] = $userTeam['number'];
        }
        $form['fields']['team'] = array('#prefix' => '<tr><td>', '#type' => 'select', '#title' => t('Team to be Associated With'), '#default_value' => $TID, '#options' => $choices, '#chosen' => true, '#suffix' => '</td></tr>', '#ajax' => array('callback' => 'modify', 'limit_validation_errors' => array(), 'wrapper' => 'div_OID_wrapper'));
    } else {
        $form['fields']['team'] = array('#markup' => '<tr><td></td></tr>');
    }
    $outreachList = dbGetOutreachListForTeam(getCurrentTeam()['TID']);
    $form_state['outreachList'] = $outreachList;
    if (empty($outreachList)) {
        drupal_set_message("You don't have any outreaches to assign this to.", 'error');
        drupal_goto($_SERVER['HTTP_REFERER']);
        return;
    }
    $form['fields']['OID-header'] = array('#markup' => '<tr><td>');
    $form['fields']['OID'] = array('#prefix' => '<div id="div_OID_wrapper">', '#type' => 'select', '#title' => t('Outreach Event to be Associated With'), '#default_value' => $media['OID'], '#validated' => true, '#options' => $form_state["outreachList"], '#chosen' => true, '#suffix' => '</div>');
    $form['fields']['OID-footer'] = array('#markup' => '</td></tr>');
    $form['fields']['remove'] = array('#prefix' => '<tr><td>', '#type' => 'submit', '#value' => t('Delete Picture'), '#limit_validation_errors' => array(), '#submit' => array("removeMediaFromForm"), '#attributes' => array('onclick' => 'if(!confirm("Are you sure you want to delete this file?")){return false;}'), '#suffix' => '</td>');
    $form['fields']['submit'] = array('#prefix' => '<td style="text-align:right">', '#type' => 'submit', '#value' => t('Submit'), '#suffix' => '</td></tr>');
    $form['tableFooter'] = array('#markup' => '</table>');
    return $form;
}
开发者ID:ChapResearch,项目名称:CROMA,代码行数:53,代码来源:mediaForms.php


示例2: getPostLink

 /**
  * Get link to blog post.
  * @return	Link to blog post.
  */
 function getPostLink()
 {
     global $dbi, $settings;
     if ($settings->linkType == 1 || $settings->linkType == 3) {
         // Check if post with same title exists
         $multiplePost = false;
         $result = $dbi->query("SELECT subject FROM " . blogPostTableName . " WHERE subject=" . $dbi->quote($this->subject) . " AND id!=" . $dbi->quote($this->id));
         if ($result->rows()) {
             $multiplePost = true;
         }
         $result->finish();
         return generateURL(scriptUrl . "/" . folderBlog . "/" . fileBlogPost, array($this->subject, $settings->linkType == 3 || $multiplePost ? $this->id : 0));
     }
     return scriptUrl . "/" . folderBlog . "/" . fileBlogPost . "?postId=" . $this->id;
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:19,代码来源:Post.class.php


示例3: generateURL

				
				
					<h2>You are about to delete a link.</h2>
					
					<p>
						Do you really want to delete this link?
					</p>
					<div class="linkPreview">
						<p class="linkAssoc">
							<?php 
        echo generateURL($link);
        ?>
<br />
							↓<br />
							<a href="<?php 
        echo generateURL($link);
        ?>
"><?php 
        echo $data[$link]['url'];
        ?>
</a>
						</p>
					</div>
					<p class="linksConfirm">
						<a href="?do=delete&amp;link=<?php 
        echo $_GET['link'];
        ?>
&amp;ok">Yes, I am</a>&nbsp;&nbsp;&nbsp;—&nbsp;&nbsp;&nbsp;<a href="?do=links">No, I changed my mind!</a>
					</p>
				
				
开发者ID:inscriptionweb,项目名称:URLShortener,代码行数:27,代码来源:index.php


示例4: saveSessionVariable

    saveSessionVariable("cqlQuery", $cqlQuery);
    // function 'saveSessionVariable()' is defined in 'include.inc.php'
    // Build the correct query URL:
    // (we skip unnecessary parameters here since function 'generateURL()' and 'show.php' will use their default values for them)
    $queryParametersArray = array("where" => $query, "submit" => $displayType, "viewType" => $viewType, "exportStylesheet" => $exportStylesheet);
    // NOTE: The 'show.php' script allows anonymous users to query the 'cite_key' field (if a valid 'userID' is included in the query URL).
    //       However, this requires that the cite key is passed in the 'cite_key' URL parameter. Since 'opensearch.php' uses the 'where'
    //       parameter to pass its query, anonymous querying of the 'cite_key' field currently does not work for 'opensearch.php'. But
    //       querying of user-specific fields will work if a user is logged in.
    if (isset($_SESSION['loginEmail'])) {
        // we only include the 'userID' parameter if the user is logged in
        $queryParametersArray["userID"] = $loginUserID;
    }
    // for user-specific fields (such as the 'cite_key' field), 'show.php' requires the 'userID' parameter
    // call 'show.php' (or 'rss.php' in case of RSS XML) with the correct query URL in order to output record details in the requested format:
    $queryURL = generateURL("show.php", $exportFormat, $queryParametersArray, false, $showRows, $rowOffset, "", $citeOrder);
    // function 'generateURL()' is defined in 'include.inc.php'
    header("Location: {$queryURL}");
}
// -------------------------------------------------------------------------------------------------------------------
// Return a diagnostic error message:
function returnDiagnostic($diagCode, $diagDetails)
{
    global $recordSchema;
    global $exportContentType;
    global $contentTypeCharset;
    // '$contentTypeCharset' is defined in 'ini.inc.php'
    global $exportStylesheet;
    // Set the appropriate mimetype & set the character encoding to the one given in '$contentTypeCharset':
    setHeaderContentType($exportContentType, $contentTypeCharset);
    // function 'setHeaderContentType()' is defined in 'include.inc.php'
开发者ID:Olari0,项目名称:Finugriling,代码行数:31,代码来源:opensearch.php


示例5: sql_array

    # Check for resources of this  type
    $affectedresources = sql_array("select ref value from resource where resource_type='{$ref}' and ref>0", 0);
    if (count($affectedresources) > 0 && $targettype == "") {
        //User needs to confirm a new resource type
        $confirm_delete = true;
    } else {
        //If we have a target type, move the current resources to the new resource type
        if ($targettype != "" && $targettype != $ref) {
            include "../../include/resource_functions.php";
            foreach ($affectedresources as $affectedresource) {
                update_resource_type($affectedresource, $targettype);
            }
        }
        // Delete the resource type
        sql_query("delete from resource_type where ref='{$ref}'");
        redirect(generateURL($baseurl_short . "pages/admin/admin_resource_types.php", $url_params));
    }
}
# Fetch  data
$restypedata = sql_query("\n\tselect \n\t\tref,\n\t\tname,\n\t\torder_by,\n\t\tconfig_options,\n\t\tallowed_extensions,\n\t\ttab_name\n        from\n\t\tresource_type\n\twhere\n            ref='{$ref}'\n\torder by name");
$restypedata = $restypedata[0];
include "../../include/header.php";
?>
<div class="BasicsBox">
<p>    
<a href="<?php 
echo $backurl;
?>
" onClick="return CentralSpaceLoad(this,true);">&lt;&nbsp;<?php 
echo $lang["back"];
?>
开发者ID:perryrothjohnson,项目名称:resourcespace,代码行数:31,代码来源:admin_resource_type_edit.php


示例6: srwExplainResponse

function srwExplainResponse($exportStylesheet)
{
    global $contentTypeCharset;
    // these variables are specified in 'ini.inc.php'
    global $databaseBaseURL;
    global $officialDatabaseName;
    global $hostInstitutionName;
    global $feedbackEmail;
    global $logoImageURL;
    global $defaultLanguage;
    global $defaultFeedFormat;
    global $loc;
    // defined in 'locales/core.php'
    $srwCollectionDoc = new XMLDocument();
    $srwCollectionDoc->setEncoding($contentTypeCharset);
    $srwCollection = srwGenerateBaseTags("explainResponse");
    $srwRecordBranch = new XMLBranch("srw:record");
    srwGeneratePackingSchema($srwRecordBranch, "xml", "zeerex");
    $srwRecordDataBranch = new XMLBranch("srw:recordData");
    $srwExplainBranch = new XMLBranch("explain");
    $srwExplainBranch->setTagAttribute("xmlns", "http://explain.z3950.org/dtd/2.0/");
    $srwExplainBranch->setTagAttribute("xmlns:refb", "http://refbase.net/");
    // extract the protocol from the base URL:
    if (preg_match("#^([^:]+)://.*#", $databaseBaseURL)) {
        $databaseProtocol = preg_replace("#^([^:]+)://.*#", "\\1", $databaseBaseURL);
    } else {
        $databaseProtocol = "";
    }
    // extract the host from the base URL:
    if (preg_match("#^[^:]+://(?:www\\.)?[^/]+.*#", $databaseBaseURL)) {
        $databaseHost = preg_replace("#^[^:]+://(?:www\\.)?([^/]+).*#", "\\1", $databaseBaseURL);
    } else {
        $databaseHost = $databaseBaseURL;
    }
    // extract the path on server from the base URL:
    if (preg_match("#^[^:]+://(?:www\\.)?[^/]+/.+#", $databaseBaseURL)) {
        $databasePathOnServer = preg_replace("#^[^:]+://(?:www\\.)?[^/]+/(.+)#", "\\1", $databaseBaseURL);
    } else {
        $databasePathOnServer = "";
    }
    // get the total number of records in the database:
    $recordCount = getTotalNumberOfRecords();
    // function 'getTotalNumberOfRecords()' is defined in 'include.inc.php'
    // get the default number of records per page preferred by the current user:
    $showRows = $_SESSION['userRecordsPerPage'];
    // get date/time information when the database was last modified:
    $lastModified = getLastModifiedDateTime();
    // function 'getLastModifiedDateTime()' is defined in 'include.inc.php'
    // --- begin server info ------------------------------------
    $srwServerInfoBranch = new XMLBranch("serverInfo");
    $srwServerInfoBranch->setTagAttribute("protocol", "SRU");
    $srwServerInfoBranch->setTagAttribute("version", "1.1");
    if (!empty($databaseProtocol)) {
        $srwServerInfoBranch->setTagAttribute("transport", $databaseProtocol);
    }
    $srwServerInfoBranch->setTagContent($databaseHost, "serverInfo/host");
    $srwServerInfoBranch->setTagContent("80", "serverInfo/port");
    // NOTE: this should really be a variable in 'ini.inc.php' or such
    addNewBranch($srwServerInfoBranch, "database", array("numRecs" => $recordCount, "lastUpdate" => $lastModified), $databasePathOnServer . "sru.php");
    // function 'addNewBranch()' is defined in 'webservice.inc.php'
    // IMPORTANT: if you want to allow remote users who are NOT logged in (userID=0) to query the refbase database
    //            via 'sru.php' then either the 'Export' or the 'Batch export' user permission needs to be
    //            enabled at 'user_options.php?userID=0'. This will allow export of XML records via 'sru.php'
    //            but won't allow a user who isn't logged in to export records via the web interface. However, you
    //            should be aware that a direct GET query like 'show.php?author=miller&submit=Export&exportFormat=MODS%20XML'
    //            will be also allowed then!
    // As an alternative, you can provide explicit login information within the 'serverInfo/authentication' tag
    // below. But, obviously, the provided login information should be only given for an account that has the
    // 'Export' permission bit enabled but has otherwise limited access rights!
    // If the 'authentication' element is present, but empty, then it implies that authentication is required
    // to connect to the server, however there is no publically available login. If it contains a string, then
    // this is the token to give in order to authenticate. Otherwise it may contain three elements:
    // 1. user: The username to supply.
    // 2. group: The group to supply.
    // 3. password: The password to supply.
    //		$srwServerInfoAuthenticationBranch = new XMLBranch("authentication");
    //		$srwServerInfoAuthenticationBranch->setTagContent("LOGINEMAIL", "authentication/user");
    //		$srwServerInfoAuthenticationBranch->setTagContent("PASSWORD", "authentication/password");
    //		$srwServerInfoBranch->addXMLBranch($srwServerInfoAuthenticationBranch);
    $srwExplainBranch->addXMLBranch($srwServerInfoBranch);
    // --- end server info --------------------------------------
    // --- begin database info ----------------------------------
    $srwDatabaseInfoBranch = new XMLBranch("databaseInfo");
    addNewBranch($srwDatabaseInfoBranch, "title", array("lang" => $defaultLanguage, "primary" => "true"), $officialDatabaseName);
    addNewBranch($srwDatabaseInfoBranch, "description", array("lang" => $defaultLanguage, "primary" => "true"), encodeHTMLspecialchars($loc["ThisDatabaseAttempts"]));
    $srwDatabaseInfoBranch->setTagContent(encodeHTMLspecialchars($hostInstitutionName), "databaseInfo/author");
    $srwDatabaseInfoBranch->setTagContent(encodeHTMLspecialchars($hostInstitutionName) . " (" . $feedbackEmail . ")", "databaseInfo/contact");
    $srwDatabaseImplementationBranch = new XMLBranch("implementation");
    $srwDatabaseImplementationBranch->setTagAttribute("version", "0.9.6");
    $srwDatabaseImplementationBranch->setTagAttribute("identifier", "refbase");
    $srwDatabaseImplementationBranch->setTagContent("Web Reference Database (http://refbase.sourceforge.net)", "implementation/title");
    $srwDatabaseInfoBranch->addXMLBranch($srwDatabaseImplementationBranch);
    $srwDatabaseLinksBranch = new XMLBranch("links");
    addNewBranch($srwDatabaseLinksBranch, "link", array("type" => "www"), $databaseBaseURL);
    addNewBranch($srwDatabaseLinksBranch, "link", array("type" => "sru"), $databaseBaseURL . "sru.php");
    addNewBranch($srwDatabaseLinksBranch, "link", array("type" => "rss"), $databaseBaseURL . generateURL("show.php", $defaultFeedFormat, array("where" => 'serial RLIKE ".+"'), true, $showRows));
    // function 'generateURL()' is defined in 'include.inc.php'
    addNewBranch($srwDatabaseLinksBranch, "link", array("type" => "icon"), $databaseBaseURL . $logoImageURL);
    $srwDatabaseInfoBranch->addXMLBranch($srwDatabaseLinksBranch);
    $srwExplainBranch->addXMLBranch($srwDatabaseInfoBranch);
//.........这里部分代码省略.........
开发者ID:Olari0,项目名称:Finugriling,代码行数:101,代码来源:srwxml.inc.php


示例7: printLinks

function printLinks($showLinkTypes, $row, $showQuery, $showLinks, $wrapResults, $userID, $viewType, $orderBy)
{
    global $databaseBaseURL;
    // these variables are defined in 'ini.inc.php'
    global $filesBaseURL;
    global $fileVisibility;
    global $fileVisibilityException;
    global $openURLResolver;
    global $isbnURLFormat;
    global $tableRefs, $tableUserData;
    // defined in 'db.inc.php'
    global $loc;
    // '$loc' is made globally available in 'core.php'
    global $client;
    // Note: for proper placement of links within the Links column we don't use the 'mergeLinks()' function here (as is done for Details view),
    //       since spacing before links is handled individually for each link type
    $links = "";
    // make sure that our buffer variable is empty
    // count the number of available link elements:
    $linkElementCounterLoggedOut = 0;
    // if the 'user_permissions' session variable contains 'allow_details_view'...
    if (in_array("details", $showLinkTypes) and isset($_SESSION['user_permissions']) and preg_match("/allow_details_view/", $_SESSION['user_permissions'])) {
        $linkElementCounterLoggedOut = $linkElementCounterLoggedOut + 1;
    }
    // if the 'user_permissions' session variable contains 'allow_edit'...
    if (in_array("edit", $showLinkTypes) and isset($_SESSION['user_permissions']) and preg_match("/allow_edit/", $_SESSION['user_permissions'])) {
        $linkElementCounterLoggedOut = $linkElementCounterLoggedOut + 1;
    }
    // if either the URL or the DOI field contain something
    if (in_array("url", $showLinkTypes) and !empty($row["url"]) or in_array("doi", $showLinkTypes) and !empty($row["doi"])) {
        $linkElementCounterLoggedOut = $linkElementCounterLoggedOut + 1;
    } elseif (in_array("isbn", $showLinkTypes) and !empty($isbnURLFormat) and !empty($row["isbn"])) {
        // provide a link to an ISBN resolver
        $linkElementCounterLoggedOut = $linkElementCounterLoggedOut + 1;
    } elseif (in_array("xref", $showLinkTypes) and !empty($openURLResolver)) {
        $linkElementCounterLoggedOut = $linkElementCounterLoggedOut + 1;
    }
    $linkElementCounterLoggedIn = $linkElementCounterLoggedOut;
    // if a user is logged in and a FILE is associated with the current record
    if (in_array("file", $showLinkTypes) and ($fileVisibility == "everyone" or $fileVisibility == "login" and isset($_SESSION['loginEmail']) or $fileVisibility == "user-specific" and (isset($_SESSION['user_permissions']) and preg_match("/allow_download/", $_SESSION['user_permissions'])) or !empty($fileVisibilityException) and preg_match($fileVisibilityException[1], $row[$fileVisibilityException[0]]))) {
        if (!empty($row["file"])) {
            // if the 'file' field is NOT empty
            $linkElementCounterLoggedIn = $linkElementCounterLoggedIn + 1;
        }
    }
    if (preg_match("/^inc/i", $client)) {
        // we open links in a new browser window if refbase data are included somewhere else:
        $target = " target=\"_blank\"";
    } else {
        $target = "";
    }
    if (preg_match("/^(cli|inc)/i", $client) or $wrapResults == "0") {
        // we use absolute links for CLI clients, for include mechanisms, or when returning only a partial document structure
        $baseURL = $databaseBaseURL;
    } else {
        $baseURL = "";
    }
    if (in_array("details", $showLinkTypes) and isset($_SESSION['user_permissions']) and preg_match("/allow_details_view/", $_SESSION['user_permissions'])) {
        // display a link that opens the Details view for this record:
        // NOTE: we use a 'show.php' URL here since it is much shorter and easier to bookmark as a permanent link; however,
        //       this means one additional redirect; the old code that directly generates a 'search.php' URL is commented out below
        // TODO: verify that the time lag introduced by the redirect action is generally acceptable!
        $queryParametersArray = array("record" => $row["serial"]);
        // we only add further parameters to the 'show.php' URL if their current value differs from the defaults used by 'show.php' or 'search.php':
        if (!empty($viewType) and !preg_match("/^Web\$/i", $viewType)) {
            $queryParametersArray["viewType"] = $viewType;
        }
        if ($showQuery == "1") {
            $queryParametersArray["showQuery"] = $showQuery;
        }
        if ($showLinks == "0") {
            // this is kinda superfluous since, for '$showLinks=0', the link isn't shown in the first place
            $queryParametersArray["showLinks"] = $showLinks;
        }
        $links .= "\n\t\t<a href=\"" . $baseURL . generateURL("show.php", "html", $queryParametersArray, true) . "\"" . $target . ">" . "<i class=\"fa fa-search\"></i></a>";
        // Old code that directly generates a 'search.php' URL which points to Details view for this record:
        //			// Construct the SQL query:
        //			// TODO: build the complete SQL query first (using functions 'buildFROMclause()' and 'buildORDERclause()'), then rawurlencode and add to link
        //			$showDetailsQuery = buildSELECTclause("Display", $showLinks, "", false, false); // function 'buildSELECTclause()' is defined in 'include.inc.php'
        //
        //			// ... display a link that opens the Details view for this record:
        //			if (isset($_SESSION['loginEmail'])) // if a user is logged in, show user specific fields:
        //				$links .= "\n\t\t<a href=\"" . $baseURL . "search.php"
        //				        . "?sqlQuery=" . rawurlencode($showDetailsQuery) . "%20FROM%20" . $tableRefs . "%20LEFT%20JOIN%20" . $tableUserData . "%20ON%20serial%20%3D%20record_id%20AND%20user_id%20%3D%20" . $userID . "%20";
        //			else // if NO user logged in, don't display any user specific fields and hide the 'location' field:
        //				$links .= "\n\t\t<a href=\"" . $baseURL . "search.php"
        //				        . "?sqlQuery=" . rawurlencode($showDetailsQuery) . "%20FROM%20" . $tableRefs . "%20";
        //
        //			$links .= "WHERE%20serial%20RLIKE%20%22%5E%28" . $row["serial"]
        //			        . "%29%24%22%20ORDER%20BY%20" . rawurlencode($orderBy)
        //			        . "&amp;formType=sqlSearch"
        //			        . "&amp;showQuery=" . $showQuery
        //			        . "&amp;showLinks=" . $showLinks
        //			        . "&amp;submit=Display"
        //			        . "&amp;viewType=" . $viewType
        //			        . "\"" . $target . ">"
        //			        . "<img src=\"" . $baseURL . "img/details.gif\" alt=\"" . $loc["details"] . "\" title=\"" . $loc["LinkTitle_ShowDetails"] . "\" width=\"9\" height=\"17\" hspace=\"0\" border=\"0\"></a>";
    }
    if (($linkElementCounterLoggedOut > 0 or isset($_SESSION['loginEmail']) and $linkElementCounterLoggedIn > 0) and (in_array("details", $showLinkTypes) and isset($_SESSION['user_permissions']) and preg_match("/allow_details_view/", $_SESSION['user_permissions']))) {
        $links .= "&nbsp;&nbsp;";
//.........这里部分代码省略.........
开发者ID:Olari0,项目名称:Finugriling,代码行数:101,代码来源:search.php


示例8: urlencode

<input type=hidden name=ref value="<?php echo urlencode($ref) ?>">


<?php
if (isset($error_text)) { ?><div class="PageInformal"><?php echo $error_text?></div><?php }
if (isset($saved_text)) { ?><div class="PageInformal"><?php echo $saved_text?></div> <?php }


if($confirm_delete)
    {
    ?>
    <input name="confirmdelete" id="confirmdelete" type="hidden" value="">
    <div class="textcenter">
	<input name="delete" type="button" value="&nbsp;&nbsp;<?php echo $lang["action-delete"]?>&nbsp;&nbsp;" onClick="jQuery('#delete').val('yes');jQuery('#confirmdelete').val('yes');this.form.submit();" />
	<input type="button" class="button" onClick="CentralSpaceLoad('<?php generateURL($baseurl_short . "/pages/admin/admin_resource_type_field_edit.php",$url_params,array("ref"=>"")); ?>',true);return false;" value="&nbsp;&nbsp;<?php echo $lang["cancel"] ?>&nbsp;&nbsp;" >
    </div>
     <?php	
    }
else
    {
    ?>
 
    <div class="Question"><label><?php echo $lang["property-field_id"] ?></label>
	<div class="Fixed"><?php echo  $fielddata["ref"] ?></div>
	<div class="clearerleft"> </div>
    </div>
    
    <?php
    foreach ($fieldcolumns as $column=>$column_detail)		
		    {
开发者ID:artsmia,项目名称:mia_resourcespace,代码行数:30,代码来源:admin_resource_type_field_edit.php


示例9: getSetting

?>
<lable for="settings_email">Email Address:&nbsp;</label><input type="text" id="settings_email" value="<?php 
echo getSetting("email");
?>
" /> <span>The email address which emails (electronic mail (telegrams (long distance tranmission of messages)) messages) are sent from.</span><br />
<lable for="settings_replyToEmail">Reply to Address:&nbsp;</label><input type="text" id="settings_replyToEmail" value="<?php 
echo getSetting("replyToEmail");
?>
" /> <span>The email address which replies are sent to.</span><br />
<button class="btn btn-primary" id="settings_save">Save</button><br /><br />
<span id="settings_save_load">
<script type="text/javascript">
function loadUsers() {
	$("#users_list tbody").load("<?php 
echo generateURL("api/users/list");
?>
/");
}
$(document).ready(function() {

	$("#settings_save").click(function() {
		$("#settings_save_load").load("<?php 
echo generateURL("api/settings/save");
?>
/", {email: $("#settings_email").val(), replyToEmail: $("#settings_replyToEmail").val()});
	});
});
</script>
<?php 
require_once "footer.php";
exit;
开发者ID:GRMrGecko,项目名称:ITClub,代码行数:31,代码来源:settings.php


示例10: getPageLink

 /**
  * Get link to page.
  * @return	Link to this page.
  */
 function getPageLink()
 {
     global $dbi, $settings;
     if (!empty($this->fullLink)) {
         return parseString($this->fullLink);
     }
     $title = !empty($this->navbarTitle) ? $this->navbarTitle : $this->title;
     if ($settings->linkType == 1 || $settings->linkType == 3) {
         // Check if pages with same title exists
         $multiplePages = false;
         $result = $dbi->query("SELECT title FROM " . pageTableName . " WHERE title=" . $dbi->quote($title) . " AND id!=" . $dbi->quote($this->id));
         if ($result->rows()) {
             $multiplePages = true;
         }
         $result->finish();
         return generateURL(scriptUrl . "/" . filePage, array($title, $multiplePages || $settings->linkType == 3 ? $this->id : 0));
     }
     return scriptUrl . "/" . filePage . "?pageId=" . $this->id;
 }
开发者ID:gkathir15,项目名称:catmis,代码行数:23,代码来源:Page.class.php


示例11: returnMsg

//       be displayed above results of the last multi-record query even when the user browses to another search results page or changes the sort order.
$HeaderString = returnMsg($headerMsg, "", "", "HeaderString");
// function 'returnMsg()' is defined in 'include.inc.php'
if ($recordAction == "add") {
    // Display the newly added record:
    header("Location: show.php?record=" . $serialNo . "&headerMsg=" . rawurlencode($headerMsg));
} elseif ($recordAction == "delet" and !empty($oldMultiRecordQuery)) {
    // Generate a 'search.php' URL that points to the last multi-record query:
    $oldMultiRecordQueryURL = generateURL("search.php", "html", $oldMultiRecordQuery, false);
    // Display the previous search results:
    header("Location: {$oldMultiRecordQueryURL}");
} elseif ($recordAction != "delet" and !empty($oldQuery)) {
    // Remove any previous 'headerMsg' parameter from the saved query URL:
    unset($oldQuery["headerMsg"]);
    // Generate a 'search.php' URL that points to the formerly displayed results page:
    $queryURL = generateURL("search.php", "html", $oldQuery, false);
    // Route back to the previous results display:
    // (i.e., after submission of the edit mask, we now go straight back to the results list that was displayed previously,
    //  no matter what display type it was (List view, Citation view, or Details view))
    header("Location: {$queryURL}");
} else {
    // (4) Call 'receipt.php' which displays links to the modifyed/added record as well as to the previous search results page (if any)
    //     (routing feedback output to a different script page will avoid any reload problems effectively!)
    header("Location: receipt.php?recordAction=" . $recordAction . "&serialNo=" . $serialNo . "&headerMsg=" . rawurlencode($headerMsg));
}
// --------------------------------------------------------------------
// (5) CLOSE CONNECTION
// (5) CLOSE the database connection:
disconnectFromMySQLDatabase();
// function 'disconnectFromMySQLDatabase()' is defined in 'include.inc.php'
// --------------------------------------------------------------------
开发者ID:Olari0,项目名称:Finugriling,代码行数:31,代码来源:modify.php


示例12: generateURL

    ?>
<div class="PageInformal"><?php 
    echo $saved_text;
    ?>
</div> <?php 
}
if ($confirm_delete) {
    ?>
    <input name="confirmdelete" id="confirmdelete" type="hidden" value="">
    <div class="textcenter">
	<input name="delete" type="button" value="&nbsp;&nbsp;<?php 
    echo $lang["action-delete"];
    ?>
&nbsp;&nbsp;" onClick="jQuery('#delete').val('yes');jQuery('#confirmdelete').val('yes');this.form.submit();" />
	<input type="button" class="button" onClick="CentralSpaceLoad('<?php 
    generateURL($baseurl_short . "/pages/admin/admin_resource_type_field_edit.php", $url_params, array("ref" => ""));
    ?>
',true);return false;" value="&nbsp;&nbsp;<?php 
    echo $lang["cancel"];
    ?>
&nbsp;&nbsp;" >
    </div>
     <?php 
} else {
    ?>
 
    <div class="Question"><label><?php 
    echo $lang["property-field_id"];
    ?>
</label>
	<div class="Fixed"><?php 
开发者ID:perryrothjohnson,项目名称:resourcespace,代码行数:31,代码来源:admin_resource_type_field_edit.php


示例13: viewOutreachEvent

function viewOutreachEvent()
{
    global $user;
    $UID = $user->uid;
    $params = drupal_get_query_parameters();
    if (isset($params['OID']) && $params['OID'] > 0) {
        $OID = $params['OID'];
        $outreach = dbGetOutreach($OID);
        if ($outreach == false) {
            drupal_set_message('Invalid outreach event. Click <a href="?q=teamDashboard">here</a> to navigate back to events in Team Dashboard.', 'error');
            return;
        }
        $TID = $outreach['TID'];
        if (!isMyTeam($TID)) {
            drupal_set_message('You do not have permission to access this page.', 'error');
            return;
        }
        // if the outreach status is outreach and the event is over, then turn the status to write up
        if ($outreach['status'] == "isOutreach") {
            outreachToWriteUp($OID);
        }
        // determine if the user can physically sign up
        $canSignUp = !dbIsOutreachOver($OID) && ($outreach['status'] == 'isOutreach' || $outreach['status'] == 'doingWriteUp');
        $markup = '';
        $markup .= '<div style="float:left; width:38%">';
        $markup .= '<table style="margin:0px 0px 10px 0px;"><tr>';
        $markup .= '<td style="padding:0px 14px 10px 14px;"><div align="left"><h2 style="margin:0px 0px 7px 0px;"><b>';
        // display outreach name
        $markup .= "{$outreach['name']}";
        $markup .= '</b></h2></div></td></tr>';
        $markup .= '<tr><td>';
        $markup .= showOutreachStatusIcon($outreach['status']);
        // displays the icon for a public outreach
        $markup .= $outreach['isPublic'] ? '<span title="Public"><img class="eventPrivacyIcon" src="/images/icons/publicBlue.png"></span>' : '<span title="Private"><img class="eventPrivacyIcon" src="/images/icons/privateBlue.png"></span>';
        // displays the icon for a cancelled outreach
        $markup .= $outreach['cancelled'] ? '<span title="Event Cancelled"><img class="eventCancelledIcon" src="/images/icons/cancelledRed.png"' : '';
        $markup .= '</td></tr></table>';
        $markup .= '<table id="photoAndEdit"><tr><td style="padding:0px;">';
        // cannot edit photo if user doesn't have the correct permissions
        if (!isMyOutreach($OID) && !hasPermissionForTeam('editAnyOutreach', getCurrentTeam()['TID'])) {
            $markup .= '<div align="right">';
            $markup .= '<span title="Edit Photo"><button type="button" disabled><img class="editIcon" src="/images/icons/editThumbnailWhite.png"></button></span>';
            $markup .= '</div>';
        } else {
            // edit photo if user has permissions
            $markup .= '<div align="right">';
            $markup .= '<a href= "?q=editThumbnail';
            $markup .= '&OID=' . $OID . '&FID=' . $outreach['FID'] . '">';
            $markup .= '<span title="Edit Photo"><button type="button"><img class="editIcon" src="/images/icons/editThumbnailWhite.png"></button></a></span>';
            $markup .= '</div>';
        }
        $markup .= '</td></tr><tr><td style="padding:0px;">';
        // default picture for outreach
        if (!empty($outreach['FID'])) {
            $FID = dbGetOutreachThumbnail($OID);
            $url = generateURL($FID);
            $markup .= '<div align="center"><img src="' . $url . '" style="max-width:150px; width:auto; height:auto; padding: 5px 0px 5px 0px">';
        } else {
            $markup .= '<div align="center"><img src="/images/defaultPics/team.png" style="max-width:200px; width:auto; height:auto; padding: 15px 0px 15px 0px">';
        }
        $markup .= '</div></td></tr></table></div>';
        $markup .= '<div align="right">';
        // if the status is write-up, then allow a user to submit a write up
        if ($outreach['status'] == 'doingWriteUp' && !$outreach['isWriteUpSubmitted']) {
            $markup .= '<a href="?q=writeupform&OID=' . $outreach['OID'] . '"><button>Write Up</button></a>';
        } else {
            if ($outreach['isWriteUpSubmitted'] && hasPermissionForTeam('approveIdeas', $TID) && $outreach['status'] == 'doingWriteUp') {
                $markup .= '<a href="?q=writeupform&OID=' . $outreach['OID'] . '&approving"><button>Approve Write Up</button></a>';
            }
        }
        // if the status is idea, then allow a user with permissions to approve or reject the idea
        if ($outreach['status'] == 'isIdea' && hasPermissionForTeam('approveIdeas', $TID)) {
            $markup .= '<a href="?q=approveIdea/' . $outreach['OID'] . '/' . $TID . '"><button>Approve</button></a>';
            $markup .= '<a href="?q=rejectIdea/' . $outreach['OID'] . '/' . $TID . '"><button>Reject</button></a>';
        }
        // notifications button
        if (!isMyOutreach($OID) && !hasPermissionForTeam('editAnyOutreach', getCurrentTeam()['TID'])) {
            $markup .= '<button type="button" disabled>Notifications</button>';
        } else {
            $markup .= '<a href="?q=manageNotifications&OID=' . $outreach['OID'] . '"><button>Notifications</button></a>';
        }
        // manage sign-ups button
        if (!dbIsOutreachCancelled($OID)) {
            if (dbIsUserSignedUp($UID, $OID)) {
                if (dbIsOutreachOver($OID)) {
                    $markup .= '<a href="?q=signUp&OID=' . $OID . '"><div class="help tooltip4"><button type="button" disabled>Edit Sign Up</button><span id="helptext"; class="helptext tooltiptext4">You cannot edit your sign up for this event because it is already over.</span></div></a>';
                } else {
                    $markup .= '<a href="?q=signUp&OID=' . $OID . '"><div class="help tooltip4"><button type="button">Edit Sign Up</button><span id="helptext"; class="helptext tooltiptext4">Click here to edit your sign up for this event.</span></div></a>';
                }
            } else {
                if (dbIsOutreachOver($OID) || $outreach['status'] == 'isIdea') {
                    $markup .= '<a href="?q=signUp&OID=' . $OID . '"><div class="help tooltip4"><button type="button" disabled>Sign Up</button><span id="helptext"; class="helptext tooltiptext4">You cannot sign up for this event because it is already over.</span></div></a>';
                } else {
                    $markup .= '<a href="?q=signUp&OID=' . $OID . '"><div class="help tooltip4"><button type="button">Sign Up</button><span id="helptext"; class="helptext tooltiptext4">Click here to sign up for this event.</span></div></a>';
                }
            }
        } else {
            $markup .= '<a href="?q=signUp&OID=' . $OID . '"><div class="help tooltip4"><button type="button" disabled>Sign Up</button><span id="helptext"; class="helptext tooltiptext4">You cannot sign up for this event because it is cancelled.</span></div></a>';
        }
        // hours button
//.........这里部分代码省略.........
开发者ID:ChapResearch,项目名称:CROMA,代码行数:101,代码来源:viewOutreachEvent.php


示例14: databaseQuery

            $error = "Invalid login credentials.";
        } else {
            databaseQuery("UPDATE users SET time=%d WHERE email=%s", $_MGM['time'], $email);
            setcookie("{$_MGM['CookiePrefix']}user_email", $email, $_MGM['time'] + 31536000, $_MGM['CookiePath'], $_MGM['CookieDomain']);
            setcookie("{$_MGM['CookiePrefix']}user_password", hash("sha512", $epassword . $_MGM['time']), $_MGM['time'] + 31536000, $_MGM['CookiePath'], $_MGM['CookieDomain']);
            header("location: " . generateURL("members"));
            exit;
        }
    }
}
require_once "header.php";
if (!empty($error)) {
    ?>
<div style="color: #ff0000; font-weight: bold;"><?php 
    echo $error;
    ?>
</div><?php 
}
?>
<form action="<?php 
echo generateURL("login");
?>
" method="POST">
<input type="hidden" name="login" value="true" />
<input type="email" placeholder="Email" name="email" /><br />
<input type="password" placeholder="Password" name="password" /><br />
<input type="submit" value="Login" class="btn" />
</form>
<?php 
require_once "footer.php";
exit;
开发者ID:GRMrGecko,项目名称:ITClub,代码行数:31,代码来源:login.php


示例15: citeRecords


//.........这里部分代码省略.........
                            }
                            // function 'encodeField()' is defined in 'include.inc.php'
                            $recordData .= "</div>";
                        }
                    }
                    // Print a row with links for the current record:
                    $recordData .= "\n\t\t\t<div class=\"reflinks\">";
                    // - Print the record's permanent URL:
                    if (preg_match("/^inc/i", $c 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generateUrl函数代码示例发布时间:2022-05-15
下一篇:
PHP generateToken函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap