当前位置: 首页>>代码示例>>PHP>>正文


PHP displayPage函数代码示例

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


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

示例1: displayPage

<?php

require_once __DIR__ . '/config.inc.php';
require_once APP_PATH . '/include/page-generator.inc.php';
// TODO: might be nice to have an option to remove a previously synced ICS feed
displayPage('
	<h3>Choose Import/Export Direction</h3>
	<p>In which direction do you want to send your information>?</p>
	<ul>
		<li><a href="export.php">Export:</a> I would like to get an ICS feed of the calendar information (which I can subscribe to in Google, iCal, Outlook, etc.) for a specific course in Canvas.</li>
		<li><a href="import.php">Import:</a> I have an ICS feed (from Google, Smartsheet, iCloud, etc.) that I want to bring into a Canvas course, user or group.</li>
	</ul>
');
开发者ID:stopfstedt,项目名称:canvas-ics-sync,代码行数:13,代码来源:index.php

示例2: displayError

/**
 * Because not every script works the right way the first time, and it's handy
 * to get well-formatted error messages
 **/
function displayError($object, $isList = false, $title = null, $message = null, $debugLevel = null)
{
    if (!defined('DEBUGGING')) {
        define('DEBUGGING', DEBUGGING_DEFAULT);
    }
    if (!isset($debugLevel) || isset($debugLevel) && DEBUGGING & $debugLevel) {
        $content = '<div class="error">' . ($title ? "<h3>{$title}</h3>" : '') . ($message ? "<p>{$message}</p>" : '');
        if ($isList) {
            $content .= '<dl>';
            if (array_keys($object) !== range(0, count($object) - 1)) {
                foreach ($object as $term => $definition) {
                    $content .= "<dt>{$term}</dt><dd><pre>" . print_r($definition, true) . '</pre></dd>';
                }
            } else {
                foreach ($object as $element) {
                    $content .= '<dd><pre>' . print_r($element, true) . '</pre></dd>';
                }
            }
            $content .= '</dl>';
        } else {
            $content .= '<pre>' . print_r($object, true) . '</pre>';
        }
        $content .= '</div>';
        displayPage($content);
    }
}
开发者ID:stopfstedt,项目名称:canvas-ics-sync,代码行数:30,代码来源:page-generator.inc.php

示例3: ConvertAndDisplayPdf

function ConvertAndDisplayPdf(&$request)
{
    global $WikiTheme;
    if (empty($request->_is_buffering_output)) {
        $request->buffer_output(false);
    }
    $pagename = $request->getArg('pagename');
    $dest = $request->getArg('dest');
    // Disable CACHE
    $WikiTheme->DUMP_MODE = true;
    include_once "lib/display.php";
    // TODO: urldecode pagename to get rid of %20 in filename.pdf
    displayPage($request, new Template('htmldump', $request));
    $html = ob_get_contents();
    $WikiTheme->DUMP_MODE = false;
    // check hook for external converters
    if (defined('USE_EXTERNAL_HTML2PDF') and USE_EXTERNAL_HTML2PDF) {
        // See http://phpwiki.sourceforge.net/phpwiki/PhpWikiToDocBookAndPDF
        // htmldoc or ghostscript + html2ps or docbook (dbdoclet, xsltproc, fop)
        Header('Content-Type: application/pdf');
        $request->discardOutput();
        $request->buffer_output(false);
        require_once "lib/WikiPluginCached.php";
        $cache = new WikiPluginCached();
        $cache->newCache();
        $tmpfile = $cache->tempnam('pdf.html');
        $fp = fopen($tmpfile, "wb");
        fwrite($fp, $html);
        fclose($fp);
        passthru(sprintf(USE_EXTERNAL_HTML2PDF, $tmpfile));
        unlink($tmpfile);
    }
    // clean the hints errors
    global $ErrorManager;
    $ErrorManager->destroyPostponedErrors();
    if (!empty($errormsg)) {
        $request->discardOutput();
    }
}
开发者ID:hugcoday,项目名称:wiki,代码行数:39,代码来源:pdf.php

示例4: displayPage

    displayPage($sideBar, '<div id="box1">
			<h2 id="sName">Late Log - Select a name</h2>
						<div id="grid" style="display: none;">
							<script>
							$(document).ready(function() {																																			        
		                        var dataSource = new kendo.data.DataSource({
		                            transport: {
		                                read:  {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                update: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                destroy: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                create: {
		                                    url: "",
		                                    dataType: "json"
		                                },
		                                parameterMap: function(options, operation) {
		                                    if (operation !== "read" && options.models) {
		                                        return {models: kendo.stringify(options.models)};
		                                    }
		                                }
		                            },
		                            batch: true,
		                            pageSize: 10,					                          
		                            schema: {
		                                model: {
		                                    id: "uniqueID",
		                                    fields: {
		                                    	uniqueID: { editable: false, nullable: true },
		                                        memID: { editable: false, nullable: true },
		                                        name: { editable: true, validation: { required: true } },	                                        
		                                        date: { editable: true, type: "date" },
		                                        timeArrived: { editable: true, validation: { required: true } },
		                                        schedTime: { editable: true, validation: { required: true } },
		                                        managerName: { editable: true },
		                                        comments: { editable: true, validation: { required: true } }
		                                    }
		                                }
		                            }
		                        });

			                    $("#grid").kendoGrid({
			                        dataSource: dataSource,
			                        sortable: true,
			                        pageable: true,		                        
			                        height: 500,
			                        toolbar: ["create"],
			                        columns: [				                            
			                            { field: "name", title: "Employee Name", width: "120px" },
			                            { field: "date", title: "Date", format: "{0:MM/dd/yyyy}", width: "90px" },
			                            { field: "timeArrived", title: "Time Arrived", width: "100px" },
			                            { field: "schedTime", title: "Sched. Arrival", width: "110px" },
			                            { field: "managerName", title: "Manager Name", width: "115px" },
			                            { field: "comments", title: "Comments", width: "140px",editor: textareaEditor },		                            
			                            { command: ["edit", "destroy"], title: "&nbsp;"}],
			                        editable: "popup"
			                    });	

			                    $(".lateName").click(function () {
			                    		
			                    	$("#sName").html("Late Log - " + $(this).html());	
			                    	$("#grid").show();			
									var grid = $("#grid").data("kendoGrid");
									grid.dataSource.transport.options.read.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=1";
									grid.dataSource.transport.options.update.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=2"; 
									grid.dataSource.transport.options.destroy.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=3"; 
									grid.dataSource.transport.options.create.url = "/modules/getLate.php?id=" + $(this).attr("value") + "&q=4"; 
									dataSource.read();					        					    		
								});

			                    function textareaEditor(container, options) {
										    	$("<textarea data-bind=\\"value: " + options.field + "\\" cols=\\"19\\" rows=\\"4\\"></textarea>")
		        								.appendTo(container);
								}													        					    												
							});
						</script>
						</div>
						</div>');
开发者ID:jamesdcampbell,项目名称:clemsoncfa,代码行数:85,代码来源:late.php

示例5: array

}
$include_file = "php" . KSESTEST_VER . ".class.kses.php";
if (file_exists($include_file) && is_readable($include_file)) {
    include_once $include_file;
} else {
    $message = array("Error:  Unable to find '" . $include_file . "'.", "Please check your include path and make sure the file is available.", "Path: " . ini_get('include_path'));
    displayPage(array('title' => 'Unable to include ' . $include_file, 'message' => $message));
    exit;
}
$kses_type = "kses" . KSESTEST_VER;
$myKses = new $kses_type();
$test_text = array();
$test_text = test1_protocols($myKses);
$test_text = array_merge($test_text, test1_html($myKses));
$test_text = array_merge($test_text, test1_kses($myKses));
displayPage(array('title' => 'New Test', 'message' => $test_text));
function test1_kses(&$myKses)
{
    $out = array(output_hr(), "Testing current configuration");
    $test_tags = array('<a href="http://www.chaos.org/">www.chaos.org</a>', '<a name="X">Short \'a name\' tag</a>', '<td colspan="3" rowspan="5">Foo</td>', '<td rowspan="2" class="mugwump" style="background-color: rgb(255, 204 204);">Bar</td>', '<td nowrap>Very Long String running to 1000 characters...</td>', '<td bgcolor="#00ff00" nowrap>Very Long String with a blue background</td>', '<a href="proto1://www.foo.com">New protocol test</a>', '<img src="proto2://www.foo.com" />', '<a href="javascript:javascript:javascript:javascript:javascript:alert(\'Boo!\');">bleep</a>', '<a href="proto4://abc.xyz.foo.com">Another new protocol</a>', '<a href="proto9://foo.foo.foo.foo.foo.org/">Test of "proto9"</a>', '<td width="75">Bar!</td>', '<td width="200">Long Cell</td>');
    $out_li = array();
    // Keep only allowed HTML from the presumed 'form'.
    foreach ($test_tags as $tag) {
        $temp = $myKses->Parse($tag);
        $check = $temp == $tag ? true : false;
        $text = $temp == $tag ? 'pass' : 'fail';
        $li_text = output_testresult($check, $text) . output_newline();
        $li_text .= "Input: &nbsp;" . output_translate($tag) . output_newline();
        $li_text .= "Output: " . output_translate($temp);
        if (KSESTEST_ENV == 'CLI') {
            $li_text .= output_newline();
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:test.oop.kses.php

示例6: isset

    $tracker['type'] = isset($pref['tracker_default_type']) ? $pref['tracker_default_type'] : MAX_CONNECTION_TYPE_SALE;
    $tracker['linkcampaigns'] = $pref['tracker_link_campaigns'] == true ? 't' : 'f';
    $tracker['description'] = '';
    $tracker['clientid'] = $clientid;
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build form
$trackerForm = buildTrackerForm($tracker);
if ($trackerForm->validate()) {
    //process submitted values
    processForm($trackerForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($tracker, $trackerForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildTrackerForm($tracker)
{
    $form = new OA_Admin_UI_Component_Form("trackerform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'trackerid', $tracker['trackerid']);
    $form->addElement('hidden', 'clientid', $tracker['clientid']);
    $form->addElement('hidden', 'move', $tracker['move']);
    $form->addElement('header', 'basic_info', $GLOBALS['strTrackerInformation']);
    $form->addElement('text', 'trackername', $GLOBALS['strName']);
    $form->addElement('text', 'description', $GLOBALS['strDescription']);
    $types = $GLOBALS['_MAX']['CONN_TYPES'];
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:tracker-edit.php

示例7: htmlspecialchars_decode

					</h2>
					<ul class="imageList">
						<li class="first">
							<h3>Cleanliness and Maintenance</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($cleanMaint)) . '
						</li>
						<li>
							<h3>Speed of Service and Taste of Food</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($sosAndTof)) . '
						</li>
						<li class="last">
							<h3>Service</h3>
							<!--<img class="left" src="images/pic2.jpg" width="60" height="60" alt="" /> -->
							' . htmlspecialchars_decode(stripslashes($service)) . '
						</li>
					</ul>	
				</div>
				<div id="box3">
					<h2>
						Leadership Meetings
					</h2>' . htmlspecialchars_decode(stripslashes($data['leaderShipNotes'])) . '</div>
				<br />
				<div id="box4">
					<h2>
						Notes
					</h2>' . htmlspecialchars_decode(stripslashes($data['notes'])) . '</div>
		';
    displayPage($sideNav, $mainPage);
}
开发者ID:Garamore,项目名称:clemsoncfa,代码行数:31,代码来源:home.php

示例8: savePage

 function savePage()
 {
     $request =& $this->request;
     if ($this->isUnchanged()) {
         // Allow admin lock/unlock even if
         // no text changes were made.
         if ($this->updateLock()) {
             $dbi = $request->getDbh();
             $dbi->touch();
         }
         // Save failed. No changes made.
         $this->_redirectToBrowsePage();
         // user will probably not see the rest of this...
         include_once 'lib/display.php';
         // force browse of current version:
         $request->setArg('version', false);
         displayPage($request, 'nochanges');
         return true;
     }
     if (!$this->user->isAdmin() and $this->isSpam()) {
         $this->_isSpam = true;
         return false;
         /*
         // Save failed. No changes made.
         $this->_redirectToBrowsePage();
         // user will probably not see the rest of this...
         include_once('lib/display.php');
         // force browse of current version:
         $request->setArg('version', false);
         displayPage($request, 'nochanges');
         return true;
         */
     }
     $page =& $this->page;
     // Include any meta-data from original page version which
     // has not been explicitly updated.
     // (Except don't propagate pgsrc_version --- moot for now,
     //  because at present it never gets into the db...)
     $meta = $this->selected->getMetaData();
     unset($meta['pgsrc_version']);
     $meta = array_merge($meta, $this->meta);
     // Save new revision
     $this->_content = $this->getContent();
     $newrevision = $page->save($this->_content, $this->version == -1 ? -1 : $this->_currentVersion + 1, $meta);
     if (!isa($newrevision, 'WikiDB_PageRevision')) {
         // Save failed.  (Concurrent updates).
         return false;
     } else {
         // Save succeded. We store cross references (if there are).
         $reference_manager =& ReferenceManager::instance();
         $reference_manager->extractCrossRef($this->_content, $page->getName(), ReferenceManager::REFERENCE_NATURE_WIKIPAGE, GROUP_ID);
         // Save succeded. We raise an event.
         $new = $this->version + 1;
         $difflink = WikiURL($page->getName(), array('action' => 'diff'), true);
         $difflink .= "&versions%5b%5d=" . $this->version . "&versions%5b%5d=" . $new;
         $eM =& EventManager::instance();
         $uM =& UserManager::instance();
         $user =& $uM->getCurrentUser();
         $eM->processEvent("wiki_page_updated", array('group_id' => GROUP_ID, 'wiki_page' => $page->getName(), 'diff_link' => $difflink, 'user' => $user, 'version' => $this->version));
     }
     // New contents successfully saved...
     $this->updateLock();
     // Clean out archived versions of this page.
     include_once 'lib/ArchiveCleaner.php';
     $cleaner = new ArchiveCleaner($GLOBALS['ExpireParams']);
     $cleaner->cleanPageRevisions($page);
     /* generate notification emails done in WikiDB::save to catch 
        all direct calls (admin plugins) */
     // look at the errorstack
     $errors = $GLOBALS['ErrorManager']->_postponed_errors;
     $warnings = $GLOBALS['ErrorManager']->getPostponedErrorsAsHTML();
     $GLOBALS['ErrorManager']->_postponed_errors = $errors;
     $dbi = $request->getDbh();
     $dbi->touch();
     global $WikiTheme;
     if (empty($warnings->_content) && !$WikiTheme->getImageURL('signature')) {
         // Do redirect to browse page if no signature has
         // been defined.  In this case, the user will most
         // likely not see the rest of the HTML we generate
         // (below).
         $this->_redirectToBrowsePage();
     }
     // Force browse of current page version.
     $request->setArg('version', false);
     //$request->setArg('action', false);
     $template = Template('savepage', $this->tokens);
     $template->replace('CONTENT', $newrevision->getTransformedContent());
     if (!empty($warnings->_content)) {
         $template->replace('WARNINGS', $warnings);
     }
     $pagelink = WikiLink($page);
     GeneratePage($template, fmt("Saved: %s", $pagelink), $newrevision);
     return true;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:94,代码来源:editpage.php

示例9: buildAdvertiserForm

        $aAdvertiser['reportdeactivate'] = 'f';
        $aAdvertiser['report'] = 'f';
        $aAdvertiser['reportinterval'] = 7;
    }
}
/*-------------------------------------------------------*/
/* MAIN REQUEST PROCESSING                               */
/*-------------------------------------------------------*/
//build advertiser form
$advertiserForm = buildAdvertiserForm($aAdvertiser);
if ($advertiserForm->validate()) {
    //process submitted values
    processForm($aAdvertiser, $advertiserForm);
} else {
    //either validation failed or form was not submitted, display the form
    displayPage($aAdvertiser, $advertiserForm);
}
/*-------------------------------------------------------*/
/* Build form                                            */
/*-------------------------------------------------------*/
function buildAdvertiserForm($aAdvertiser)
{
    $form = new OA_Admin_UI_Component_Form("clientform", "POST", $_SERVER['SCRIPT_NAME']);
    $form->forceClientValidation(true);
    $form->addElement('hidden', 'clientid', $aAdvertiser['clientid']);
    $form->addElement('header', 'header_basic', $GLOBALS['strBasicInformation']);
    $nameElem = $form->createElement('text', 'clientname', $GLOBALS['strName']);
    if (!OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
        $nameElem->freeze();
    }
    $form->addElement($nameElem);
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:31,代码来源:advertiser-edit.php

示例10: displayPage

					<li>
						<a href="#">Diam porta at sed tortor</a>
					</li>
					<li>
						<a href="#">Rutrum orci amet et lorem</a>
					</li>
					<li>
						<a href="#">Convallis sodales malesuada</a>
					</li>
					<li>
						<a href="#">Faucibus imperdiet adipiscing</a>
					</li>
					<li class="last">
						<a href="#">Dictum in amet phasellus</a>
					</li>
				</ul>';
$mainContent = '<div id="box1">
						<h2>
							Team Member Information
						</h2>
						<div id="grid">								
							<script>
				                $(document).ready(function () {
				                    
				                });
					 		</script>
						</div>
						</div>
						';
displayPage($sideBar, $mainContent);
开发者ID:jamesdcampbell,项目名称:clemsoncfa,代码行数:30,代码来源:test.php

示例11: buildBannerForm

    }
}
if (!$type) {
    if ($show_txt) {
        $type = "txt";
    }
}
$form = buildBannerForm($type, $aBanner, $oComponent, $formDisabled);
$valid = $form->validate();
if ($valid && $oComponent && $oComponent->enabled) {
    $valid = $oComponent->validateForm($form);
}
if ($valid) {
    processForm($bannerid, $form, $oComponent, $formDisabled);
} else {
    displayPage($bannerid, $campaignid, $clientid, $bannerTypes, $aBanner, $type, $form, $ext_bannertype, $formDisabled);
}
function displayPage($bannerid, $campaignid, $clientid, $bannerTypes, $aBanner, $type, $form, $ext_bannertype, $formDisabled = false)
{
    $pageName = 'advertiser-campaigns';
    $aEntities = array('clientid' => $clientid, 'campaignid' => $campaignid, 'bannerid' => $bannerid);
    $entityId = OA_Permission::getEntityId();
    $entityType = 'advertiser_id';
    $aOtherCampaigns = Admin_DA::getPlacements(array($entityType => $entityId));
    $aOtherBanners = Admin_DA::getAds(array('placement_id' => $campaignid), false);
    $advertiserId = $aEntities['clientid'];
    $campaignId = $aEntities['campaignid'];
    $bannerId = $aEntities['bannerid'];
    $entityString = _getEntityString($aEntities);
    $aOtherEntities = $aEntities;
    unset($aOtherEntities['bannerid']);
开发者ID:rcdesign-cemetery,项目名称:openx-markedtext,代码行数:31,代码来源:banner-edit.php

示例12: str_replace

$DB = str_replace("\"", "", $DB);
$connection_string = odbc_connect($DB, "", "");
$conn = mysql_connect('localhost', 'root', 'Summer01');
if (!$conn) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("usi_misc", $conn);
$date = $_GET['newDate'];
$date_timestamp = strtotime($date);
if (date('N', $date_timestamp) == 5) {
    $date_timestamp += 259200;
} else {
    $date_timestamp += 86400;
}
$datePlusOne = date('Y-m-d', $date_timestamp);
displayPage($datePlusOne);
function displayPage($date)
{
    global $DB, $connection_string, $conn, $date_timestamp;
    // ******************************************************************************************************
    // *****		 						DAILY CALL ACTIVITY REPORT 									*****
    // ******************************************************************************************************
    echo "<div id=\"tabs\" class=\"tabs\" style=\"font-size:x-small; visibility:visible\">";
    echo "<h4 style=\"font-variant: small-caps; font-size:large\">daily call center flash activity report</h4>";
    // ******************* Create All The Tabs *************************
    echo "  <ul>";
    echo "\t\t<li><a href=\"#callTotal\"<span>Total</span></a></li>";
    $query = "\tSELECT DISTINCT\t\tclientGroup\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tFROM\t\t\t\tusi_tbl_activequeue";
    $result = mysql_query($query, $conn) or die('Query failed: ' . mysql_error());
    if (mysql_num_rows($result) > 0) {
        while ($rows = mysql_fetch_array($result, MYSQL_NUM)) {
开发者ID:jasmith152,项目名称:plexis,代码行数:31,代码来源:dailyCallsFunctions.php

示例13: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     global $WikiTheme;
     $args = $this->getArgs($argstr, $request);
     extract($args);
     if ($request->getArg('action') != 'browse') {
         return $this->disabled("(action != 'browse')");
     }
     if (!$request->isGetOrHead()) {
         return $this->disabled("(method != 'GET')");
     }
     if (!$src and $page) {
         if ($page == $request->get('pagename')) {
             return $this->error(sprintf(_("recursive inclusion of page %s"), $page));
         }
         $src = WikiURL($page);
     }
     if (!$src) {
         return $this->error(sprintf(_("%s or %s parameter missing"), 'src', 'page'));
     }
     // FIXME: How to normalize url's to compare against recursion?
     if ($src == $request->getURLtoSelf()) {
         return $this->error(sprintf(_("recursive inclusion of url %s"), $src));
     }
     static $noframes = false;
     if ($noframes) {
         // Content for noframes version of page.
         return HTML::p(fmt("See %s", HTML::a(array('href' => $src), $src)));
     }
     $noframes = true;
     if ($which = $request->getArg('frame')) {
         // Generate specialized frame output (header, footer, etc...)
         $request->discardOutput();
         displayPage($request, new Template("frame-{$which}", $request));
         $request->finish();
         //noreturn
     }
     // Generate the outer frameset
     $frame = HTML::frame(array('name' => $name, 'src' => $src, 'title' => $title, 'frameborder' => (int) $frameborder, 'scrolling' => (string) $scrolling, 'noresize' => (bool) $noresize));
     if ($marginwidth) {
         $frame->setArg('marginwidth', $marginwidth);
     }
     if ($marginheight) {
         $frame->setArg('marginheight', $marginheight);
     }
     $tokens = array('CONTENT_FRAME' => $frame, 'ROWS' => $rows, 'COLS' => $cols, 'FRAMEARGS' => sprintf('frameborder="%d"', $frameborder));
     // Produce the frameset.
     $request->discardOutput();
     displayPage($request, new Template('frameset', $request, $tokens));
     $request->finish();
     //noreturn
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:52,代码来源:FrameInclude.php

示例14: printheaders

 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */
require_once '../config.inc.php';
require_once $config['base_path'] . '/includes/iolib.inc.php';
require_once $config['base_path'] . '/includes/db.inc.php';
require_once $config['base_path'] . '/includes/contrib/smarty/libs/Smarty.class.php';
require_once $config['base_path'] . '/includes/security.inc.php';
printheaders();
if (!isset($_SESSION['login']) || $_SESSION['login'] != true) {
    if (isset($_POST['do_login'])) {
        $login = false;
        $db = NewDBConnection($config['db_dsn']);
        $db->SetFetchMode(ADODB_FETCH_ASSOC);
        $login = $securitylib->login($_POST['username'], $_POST['password']);
        $db->Close();
        if ($login === true) {
            header('Location: ' . $config['base_url']);
            exit;
        }
        $content = initializeTemplate();
        $content->assign('error', 'Incorrect Username or Password');
    }
    if (!isset($content)) {
        $content = initializeTemplate();
    }
    displayPage($content, 'login', 'login.tpl');
    exit;
} else {
    header('Location: ' . $config['base_url']);
}
开发者ID:rhencke,项目名称:mozilla-cvs-history,代码行数:31,代码来源:login.php

示例15: function

		                        columns: [						                        	
		                            { field: "firstName", title: "FirstName", width: "110px" },
		                            { field: "lastName", title: "LastName", width: "110px" },
		                            { field: "phoneNumber", title: "Phone #", width: "100px" },
		                            { field: "emailAddress", title: "Email", width: "100px" },
		                            { field: "position", title: "Front/Back", width: "75px" },
									{ field: "hireDate", title: "Hired YYYY-MM-DD", width: "150px" },
		                            { field: "canLogin", title: "Manager", width: "75px" },
		                            { command: ["edit", "destroy"], title: "&nbsp;" }],
		                        editable: "popup"
		                    });
		                    		

		                    $("#bUpdatePW").click(function() {
		                    	$("#currPass").val("");
		                    	$("#newPass").val("");
		                    	$("#newPassConf").val("");
								$("#procError").hide();
								$("#updateFailed").hide();
								$("#updateSuccess").hide();
								$("#grid").hide("slow", function() {									    									
									$("#changePassword").show("slow");	    												    										
								});		    									
							});																					

		        	});
	 		</script>
	           			 		</div>';
    $sideBar = "<h3>Utilities</h3>\n\t\t\t\t\t<button id='bUpdatePW' class='lateName'>Change Password</button>";
    displayPage($sideBar, $mainPage);
}
开发者ID:jamesdcampbell,项目名称:clemsoncfa,代码行数:31,代码来源:team.php


注:本文中的displayPage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。