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


PHP mainMenu函数代码示例

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


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

示例1: catch

                $resultDelete->execute($dataDelete);
            } catch (PDOException $e) {
                $partialFail = TRUE;
            }
            //Remove settings
            try {
                $dataDelete = array("scope" => $module);
                $sqlDelete = "DELETE FROM gibbonSetting WHERE scope=:scope";
                $resultDelete = $connection2->prepare($sqlDelete);
                $resultDelete->execute($dataDelete);
            } catch (PDOException $e) {
                $partialFail = TRUE;
            }
            if ($partialFail == TRUE) {
                //Fail3
                $URL .= "&deleteReturn=fail3";
                header("Location: {$URL}");
            } else {
                //Update main menu
                $_SESSION[$guid]["mainMenu"] = mainMenu($connection2, $guid);
                //Success 0
                if ($orphaned != "true") {
                    $URLDelete = $URLDelete . "&deleteReturn=success0";
                } else {
                    $URLDelete = $URLDelete . "&deleteReturn=success1";
                }
                header("Location: {$URLDelete}");
            }
        }
    }
}
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:module_manage_uninstallProcess.php

示例2: auditTrail

<?php

require_once './inc/func_main.php';
if (isset($_SESSION['sid'])) {
    auditTrail(5, 3, 0);
}
pageStart('Přidáno');
mainMenu(1);
sparklets('<a href="./index.php">aktuality</a> &raquo; <a href="./newnews.php">nová aktualita</a> &raquo; <strong>přidáno</strong>');
if ($_POST['insertnews'] && $usrinfo['right_power'] && !preg_match('/^[[:blank:]]*$/i', $_POST['nadpis']) && !preg_match('/^[[:blank:]]*$/i', $_POST['obsah']) && is_numeric($_POST['kategorie'])) {
    MySQL_Query("INSERT INTO " . DB_PREFIX . "news VALUES('','" . Time() . "','" . $usrinfo['id'] . "','" . $_POST['kategorie'] . "','" . mysql_real_escape_string(safeInput($_POST['nadpis'])) . "','" . mysql_real_escape_string($_POST['obsah']) . "')");
    unreadRecords(5, 0);
    echo '<div id="obsah"><p>Aktualita vložena.</p></div>';
} else {
    echo '<div id="obsah"><p>Chyba při přidávání, ujistěte se, že jste vše provedli správně a máte potřebná práva.</p></div>';
}
pageEnd();
开发者ID:amberan,项目名称:dhbistro,代码行数:17,代码来源:procnews.php

示例3: MySQL_Fetch_Assoc

require_once './inc/func_main.php';
// následuje načtení dat reportu a jejich uložení do vybranných proměných
$reportarray = MySQL_Fetch_Assoc(MySQL_Query("SELECT * FROM " . DB_PREFIX . "reports WHERE id=" . $_REQUEST['rid']));
// načte data z DB
$type = intval($reportarray['type']);
// určuje typ hlášení
$typestring = $type == 1 ? 'výjezd' : ($type == 2 ? 'výslech' : '?');
//odvozuje slovní typ hlášení
$author = $reportarray['iduser'];
// určuje autora hlášení
$label = isset($reportarray['label']) ? $reportarray['label'] : '';
// nadpis hlášení, ke kterému je přiřazováno
// následuje generování hlavičky
pageStart('Úprava hlášení' . ($label != '' ? ': ' . $label . ' (' . $typestring . ')' : ''));
// specifikace TITLE
mainMenu(5);
$custom_Filter = custom_Filter(17);
sparklets('<a href="./reports.php">hlášení</a> &raquo; <strong>úprava hlášení</strong>' . ($label != '' ? ' - "' . $label . ' (' . $typestring . ')"' : ''));
// *** původní načítání autora ---
//$autharray=MySQL_Fetch_Assoc(MySQL_Query("SELECT iduser FROM ".DB_PREFIX."reports WHERE id=".$_REQUEST['rid']));
//$author=$autharray['iduser'];
// --- původní načítání autora ***
if (is_numeric($_REQUEST['rid']) && ($usrinfo['right_text'] || $usrinfo['id'] == $author)) {
    $res = MySQL_Query("SELECT * FROM " . DB_PREFIX . "reports WHERE id=" . $_REQUEST['rid']);
    if ($rec = MySQL_Fetch_Assoc($res)) {
        ?>

<div id="obsah">
	<script type="text/javascript">
	<!--
	window.onload=function(){
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:addp2ar.php

示例4: pageStart

<?php

require_once './inc/func_main.php';
pageStart('Úprava poznámky');
mainMenu(2);
switch ($_REQUEST['idtable']) {
    case 1:
        $sourceurl = "persons.php";
        $sourcename = "osoby";
        break;
    case 2:
        $sourceurl = "groups.php";
        $sourcename = "skupiny";
        break;
    case 3:
        $sourceurl = "cases.php";
        $sourcename = "případy";
        break;
    case 4:
        $sourceurl = "reports.php";
        $sourcename = "hlášení";
        break;
    case 7:
        $sourceurl = "symbols.php";
        $sourcename = "symboly";
        break;
    default:
        $sourceurl = "";
        $sourcename = "";
        break;
}
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:editnote.php

示例5: auditTrail

    }
}
if (isset($_POST['uploadfile']) && is_uploaded_file($_FILES['attachment']['tmp_name']) && is_numeric($_POST['caseid']) && is_numeric($_POST['secret'])) {
    auditTrail(3, 4, $_POST['caseid']);
    $newname = Time() . MD5(uniqid(Time() . Rand()));
    move_uploaded_file($_FILES['attachment']['tmp_name'], './files/' . $newname);
    $sql = "INSERT INTO " . DB_PREFIX . "data VALUES('','" . $newname . "','" . mysql_real_escape_string($_FILES['attachment']['name']) . "','" . mysql_real_escape_string($_FILES['attachment']['type']) . "','" . $_FILES['attachment']['size'] . "','" . Time() . "','" . $usrinfo['id'] . "','3','" . $_POST['caseid'] . "','" . $_POST['secret'] . "')";
    MySQL_Query($sql);
    if (!isset($_POST['fnotnew'])) {
        unreadRecords(3, $_POST['caseid']);
    }
    Header('Location: ' . $_POST['backurl']);
} else {
    if (isset($_POST['uploadfile'])) {
        pageStart('Přiložení souboru');
        mainMenu(4);
        sparklets('<a href="./cases.php">případy</a> &raquo; <a href="./editcase.php?rid=' . $_POST['caseid'] . '">úprava případu</a> &raquo; <strong>přiložení souboru neúspěšné</strong>');
        echo '<div id="obsah"><p>Soubor nebyl přiložen, něco se nepodařilo. Možná nebyl zvolen přikládaný soubor.</p></div>';
        pageEnd();
    }
}
if (isset($_GET['deletefile']) && is_numeric($_GET['deletefile'])) {
    auditTrail(3, 5, $_GET['caseid']);
    if ($usrinfo['right_text']) {
        $fres = MySQL_Query("SELECT uniquename FROM " . DB_PREFIX . "data WHERE " . DB_PREFIX . "data.id=" . $_GET['deletefile']);
        $frec = MySQL_Fetch_Assoc($fres);
        UnLink('./files/' . $frec['uniquename']);
        MySQL_Query("DELETE FROM " . DB_PREFIX . "data WHERE " . DB_PREFIX . "data.id=" . $_GET['deletefile']);
    }
    Header('Location: editcase.php?rid=' . $_GET['caseid']);
}
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:proccase.php

示例6: unauthorizedAccess

function unauthorizedAccess($record_type, $secret, $deleted, $idrecord)
{
    global $usrinfo;
    switch ($record_type) {
        case 1:
            $link = '<a href="./persons.php">osoby</a>';
            break;
        case 2:
            $link = '<a href="./groups.php">skupiny</a>';
            break;
        case 3:
            $link = '<a href="./cases.php">případy</a>';
            break;
        case 4:
            $link = '<a href="./reports.php">hlášení</a>';
            break;
        case 8:
            $link = 'A ven!';
            break;
        case 11:
            $link = 'A ven!';
            break;
    }
    if ($deleted == 1) {
        auditTrail($record_type, 13, $idrecord);
    } else {
        auditTrail($record_type, 12, $idrecord);
    }
    pageStart('Neautorizovaný přístup');
    mainMenu(5);
    sparklets($link . ' &raquo; <strong>neautorizovaný přístup</strong>');
    echo '<div id="obsah"><p>Tady nemáš co dělat.</p></div>';
    exit;
}
开发者ID:amberan,项目名称:dhbistro,代码行数:34,代码来源:func_main.php

示例7: pageStart

" />
				<input type="hidden" name="backurl" value="<?php 
        echo 'editactrep.php?rid=' . $_REQUEST['rid'];
        ?>
" />
				<input type="hidden" name="tableid" value="4" />
				<input type="submit" value="Uložit poznámku" name="setnote" class="submitbutton" title="Uložit"/>
			</div>
		</form>
		</fieldset>
	</div>
	<!-- end of #new-note .otherform-wrap -->



</div>
<!-- end of #obsah -->
<?php 
    } else {
        pageStart('Hlášení neexistuje');
        mainMenu(3);
        sparklets('<a href="./reports.php">hlášení</a> &raquo; <strong>hlášení neexistuje</strong>');
        echo '<div id="obsah"><p>Hlášení neexistuje.</p></div>';
    }
} else {
    pageStart('Tohle nezkoušejte.');
    mainMenu(3);
    sparklets('<a href="./reports.php">hlášení</a> &raquo; <strong>tohle nezkoušejte.</strong>');
    echo '<div id="obsah"><p>Tohle nezkoušejte.</p></div>';
}
pageEnd();
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:editactrep.php

示例8: mysql_connect

    // register banquet
    echo "<form id=form1 name=form1 method=get action=form.php>";
    echo "<input type=submit name=register id=register value='Banquet Registration' /></form>";
    // view attendance
    echo "<form id=form2 name=form2 method=get action=form.php>";
    echo "<input type=submit name=view id=view value='Attendance View' /></form>";
}
$attendEmail = $_GET["attendemail"];
$attendPW = $_GET["attendpw"];
$error = true;
mysql_connect("mysql.comp.polyu.edu.hk", "14073927d", "vbtnrqex");
mysql_select_db("14073927d");
$result = mysql_query("select Email, LoginPW from Attendee");
while ($row = mysql_fetch_array($result)) {
    /*echo "<tr>";
    		echo "<td>";
    		echo $row[0];
    		echo "</td><td>";
    		echo $row[1];
    		echo "</td></tr>";*/
    if ($row[0] == $attendEmail and $row[1] == $attendPW) {
        // echo "log in successfully!";
        $error = false;
        mainMenu();
        break;
    }
}
if ($error) {
    echo "fail to log in!";
}
mysql_free_result($result);
开发者ID:kowf,项目名称:testing,代码行数:31,代码来源:attendeeLogin.php

示例9: ltrim

}
// Specific case for hotkeys, in order to reset history
if (substr_count($query, '✧') == 1) {
    // empty history
    $w->write(array(), 'history.json');
    $query = ltrim($query, '✧');
}
if (mb_strlen($query) < 3) {
    // empty history
    $w->write(array(), 'history.json');
    ////////////
    //
    // MAIN MENU
    //
    ////////////
    mainMenu($w, $query, $settings, $db, $update_in_progress);
} else {
    // Go Back button appears only when typing 'bb'
    if (substr_count($query, 'bb') == 1) {
        $w->result(null, serialize(array('', '', '', '', '', '', '', 'go_back', '', '', '', '', '', '', '', '', '', '', '', '', '', '')), 'Go Back', "Return to previous step", './images/back.png', 'yes', null, '');
    }
    ////////////
    //
    // NO DELIMITER
    //
    ////////////
    if (substr_count($query, '▹') == 0) {
        searchCategoriesFastAccess($w, $query, $settings, $db, $update_in_progress);
        searchCommandsFastAccess($w, $query, $settings, $db, $update_in_progress);
        mainSearch($w, $query, $settings, $db, $update_in_progress);
    } else {
开发者ID:bycEEE,项目名称:env,代码行数:31,代码来源:main.php

示例10: sparklets

            }
            sparklets('<a href="./' . $sourceurl . '">' . $sourcename . '</a> &raquo; <strong>zobrazení poznámky</strong>', $editbutton);
            echo '<h1>' . StripSlashes($rec['title']) . '</h1>
				<h3>' . StripSlashes($rec['nuser']) . '</h3>';
            if ($rec['secret'] == 0) {
                echo '<h4>veřejná</h4>';
            }
            if ($rec['secret'] == 1) {
                echo '<h4>tajná</h4>';
            }
            if ($rec['secret'] == 2) {
                echo '<h4>soukromá</h4>';
            }
            echo '<div id="obsah">' . StripSlashes($rec['note']) . '</div>';
        } else {
            pageStart('Nemáte práva');
            mainMenu(0);
            sparklets('<strong>Nemáte práva</strong>');
            echo '<h1>Nemáte práva</h1>
				<div id="obsah">Nemáte práva číst tuto poznámku.</div>';
        }
    } else {
        pageStart('Poznámka neexistuje');
        mainMenu(0);
        sparklets('<strong>poznámka neexistuje</strong>');
        echo '<div id="obsah"><p>Osoba neexistuje.</p></div>';
    }
} else {
    echo '<div id="obsah"><p>Tohle nezkoušejte.</p></div>';
}
pageEnd();
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:readnote.php

示例11: getCategoryName

    // get category name
    $var['category'] = getCategoryName($xmlParser, $catdir);
    // generate (sub)menu
    if ($xmlParser->match("/directory[1]/menu[1]")) {
        $var['catmenu'] = menuFromXml($xmlParser->exportAsXml("/directory[1]/menu[1]"), $var['catdir']);
    } else {
        $var['catmenu'] = menuFromCatdir($var['catdir']);
    }
    // get category stylesheet
    if ($xmlParser->match("/directory/stylesheet")) {
        $var['stylesheet'] = $xmlParser->getData("/directory/stylesheet");
    }
} else {
    // generate all "by hand"
    $var['category'] = getPathElement($var['catdir'], 1);
    $var['catmenu'] = menuFromCatdir($var['catdir']);
}
// generate mainmenu
$var['mainmenu'] = mainMenu();
// set some more variables to use in template
$var['absolute_content_filename'] = htmlpath($var['filepath']);
// calculate runtime
$var['end_time'] = time();
$var['generation_time'] = $var['end_time'] - $var['start_time'];
if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) {
    header("Content-type: application/xhtml+xml");
} else {
    header("Content-type: text/html");
}
$output = template($var, "templates/" . $var['template'] . "/main.html");
echo $output;
开发者ID:BackupTheBerlios,项目名称:lxcontent,代码行数:31,代码来源:main.php

示例12: pageStart

<?php

require_once './inc/func_main.php';
pageStart('Nastavení');
mainMenu(6);
sparklets('<strong>nastavení</strong>');
?>
<script type="text/javascript" language="JavaScript">
<!--
function pwdcheck(form) 
{
	if (form.heslo.value != form.heslo2.value) {
		alert ('Hesla nejsou stejná.');
		return false
	}
	else return true;
}
-->
</script>

<div id="obsah">
	<script type="text/javascript">
	<!--
	window.onload=function(){
		FixitRight('submitbutton', 'ramecek');
	};
	-->
	</script>
<form action="procsettings.php" method="post" name="inputform" id="inputform" onSubmit="return pwdcheck(this);">
<fieldset id="ramecek"><legend><h1>Uživatel: <?php 
echo $usrinfo['login'];
开发者ID:amberan,项目名称:dhbistro,代码行数:31,代码来源:settings.php


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