本文整理汇总了PHP中TopCodeAdmin函数的典型用法代码示例。如果您正苦于以下问题:PHP TopCodeAdmin函数的具体用法?PHP TopCodeAdmin怎么用?PHP TopCodeAdmin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TopCodeAdmin函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ceil
}
$iPerPage = 10;
$iTotalPages = ceil($iTotalNum / $iPerPage);
$iCurPage = (int) $_GET['page'];
if ($iCurPage > $iTotalPages) {
$iCurPage = $iTotalPages;
}
if ($iCurPage < 1) {
$iCurPage = 1;
}
$sLimitFrom = ($iCurPage - 1) * $iPerPage;
$sqlOrder = " ORDER BY `medDate` DESC ";
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";
$sQuery = "\r\n\tSELECT\r\n\t\t`a`.`ID` as `medID`,\r\n\t\t`a`.`Owner` as `medProfId`,\r\n\t\t`a`.`Title` as `medTitle`,\r\n\t\t`a`.`Date` as `medDate`,\r\n\t\t`a`.`Listens` as `medListens`,\r\n\t\t`a`.`Approved`,\r\n\t\t`b`.`NickName`\r\n\tFROM `Ray" . $sType . "Files` as `a`\r\n\tLEFT JOIN `Profiles` as `b` ON\r\n\t\t`b`.`ID` = `a`.`Owner`\r\n\t{$sqlWhere}\r\n\t{$sqlOrder}\r\n\t{$sqlLimit}\r\n\t";
$rData = db_res($sQuery);
TopCodeAdmin();
ContentBlockHead("List of music files");
echo browseCode();
ContentBlockFoot();
BottomCode();
function browseCode()
{
global $site;
global $rData;
global $iTotalPages;
global $iCurPage;
$sCode = '<div id = "browseMain">';
$sCode .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
if (mysql_num_rows($rData)) {
while ($aData = mysql_fetch_array($rData)) {
$sStyle = $aData['Approved'] == 'true' ? ' style="border: 2px solid #00CC00;"' : ' style="border: 2px solid #CC0000;"';
示例2: ob_get_contents
<div id="helpDivId" style="width: 200px; height: auto; background-color: #F5F5F5; color: #000000; border: 1px solid silver; position: absolute; left: 0px; top: 0px; z-index: 1000; display: none;">
<div id="helpTypeId" style="position: relative; margin: 2px; padding: 1px; white-space: nowrap;">CONTENT</div>
<div id="helpDescId" style="position: relative; margin: 2px; padding: 1px;">CONTENT</div>
<div id="helpNoteId" style="position: relative; margin: 2px; padding: 1px; text-align: justify;">CONTENT</div>
</div>
<?php
$helpDivCode = ob_get_contents();
ob_end_clean();
/*
if ( $logged['admin'] )
TopCodeAdmin( $helpDivCode );
else
TopCodeAff( $helpDivCode );
*/
TopCodeAdmin($helpDivCode);
ContentBlockHead("Finance " . $sHead);
if (strlen($tr['error_text'])) {
echo "<br><center><div class=\"err\">{$tr['error_text']}</div></center><br>";
}
?>
<br>
<center>
<script type="text/javascript">
<!--
function updateControls()
{
document.forms['calculations_form'].elements['tr_order_num'].disabled = !(document.getElementById('id_order').checked);
document.forms['calculations_form'].elements['tr_last_days'].disabled = !(document.getElementById('id_last').checked);
document.forms['calculations_form'].elements['tr_exact_date'].disabled = !(document.getElementById('id_date').checked);
示例3: showMainPage
function showMainPage()
{
global $_page;
global $site;
$_page['header'] = 'Page Builder';
$_page['css_name'] = 'pageBuilder.css';
$_page['extraCodeInHead'] = <<<BLAH
\t\t\t\t
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/jquery.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/jquery.dimensions.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/jquery.form.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.mouse.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.draggable.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.draggable.ext.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.droppable.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.sortable.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.sortable.ext.js"></script>
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}jquery/ui.slider.js"></script>
\t\t\t\t
\t\t\t\t<script type="text/javascript" language="javascript" src="{$site['url']}inc/js/classes/BxDolPageBuilder.js"></script>
\t\t\t\t
\t\t\t\t<!-- tinyMCE gz -->
\t\t\t\t<script type="text/javascript" src="{$site['plugins']}tiny_mce/tiny_mce_gzip.js"></script>
\t\t\t\t<script type="text/javascript">
\t\t\t\t\ttinyMCE_GZ.init({
\t\t\t\t\t\tplugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
\t\t\t\t\t\tthemes : "simple,advanced",
\t\t\t\t\t\tlanguages : "en",
\t\t\t\t\t\tdisk_cache : true,
\t\t\t\t\t\tdebug : false
\t\t\t\t\t});
\t\t\t\t</script>
\t\t\t
\t\t\t\t<script language="javascript" type="text/javascript">
\t\t\t\t\ttinyMCE.init({
\t\t\t\t\t\tmode : "textareas",
\t\t\t\t\t\ttheme : "advanced",
\t\t\t\t\t\t
\t\t\t\t\t\teditor_selector : "form_input_html",
\t\t\t\t\t\tcontent_css : "{$site['plugins']}tiny_mce/dolphin.css",
\t\t\t\t\t\t
\t\t\t\t\t\tplugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,visualchars,nonbreaking,xhtmlxtras",
\t\t\t\t\t\trelative_urls : false,
\t\t\t\t\t\t
\t\t\t\t\t\ttheme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect",
\t\t\t\t\t\ttheme_advanced_buttons2 : "forecolor,backcolor,|,bullist,numlist,|,outdent,indent,|,link,unlink,image,hr,|,sub,sup,|,insertdate,inserttime,|,styleprops",
\t\t\t\t\t\ttheme_advanced_buttons3 : "charmap,emotions,|,cite,abbr,acronym,attribs,|,preview,removeformat,|,code,help",
\t\t\t\t\t\ttheme_advanced_buttons4 : "table,row_props,cell_props,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,row_after,row_before,split_cells,merge_cells",
\t\t\t\t\t\ttheme_advanced_toolbar_location : "top",
\t\t\t\t\t\ttheme_advanced_toolbar_align : "center",
\t\t\t\t\t\tvalid_elements : "*[*]"
\t\t\t\t\t});
\t\t\t\t</script>
BLAH;
$_page['extraCodeInBody'] = <<<BLAH
\t\t\t\t<div id="editFormWrapper"
\t\t\t\t style="display:none;" onclick="if ( ( event.target || event.srcElement ) == this ) \$(this).hide();">
\t\t\t\t\t<div id="editFormCont">
\t\t\t\t\t\t
\t\t\t\t\t</div>
\t\t\t\t</div>
BLAH;
TopCodeAdmin();
$this->showBuildZone();
BottomCode();
}
示例4: login_form
function login_form($text = "", $member = 0, $bbAjaxMode = false)
{
global $site;
global $_page_cont;
global $_page;
global $admin_dir;
global $logged;
global $dir_dir;
global $dir;
global $tmpl;
global $l, $d;
switch ($member) {
case 0:
$mem = _t("_Member");
$table = "Profiles";
$login_page = "{$site['url']}member.php";
$join_page = "{$site['url']}join.php";
$forgot_page = "{$site['url']}forgot.php";
$template = "{$dir['root']}templates/tmpl_{$tmpl}/login_form.html";
break;
case 1:
$mem = 'Admin';
$table = 'Admins';
$login_page = "{$site['url_admin']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
case 2:
$mem = "Affiliate";
$table = 'aff';
$login_page = "{$site['url_aff']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
case 3:
$mem = "Moderator";
$table = 'moderators';
$login_page = "{$site['url']}moderators/index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
}
$_page['header'] = "{$site['title']} " . _t("_Member Login");
$_page['header_text'] = _t("_Member Login");
// If path is divided with \\ (Windows) then use \\ instead of /
$script_filename = strlen($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_NAME'];
if (strstr($script_filename, '/')) {
$arr1 = split("/", $script_filename);
$s1 = $arr1[count($arr1) - 2];
} elseif (strstr($script_filename, '\\\\')) {
$arr1 = split("\\\\", $script_filename);
$s1 = $arr1[count($arr1) - 3];
}
if ($bbAjaxMode && $member == 0) {
$template = "{$dir['root']}templates/tmpl_{$tmpl}/login_form_ajax.html";
} elseif ($bbAjaxMode && $member == 1) {
$template = "{$dir['root']}templates/base/login_form_ajax_a.html";
}
$_page_cont[0]['page_main_code'] = PageCompLoginForm($text, $member, $mem, $table, $login_page, $join_page, $forgot_page, $template);
if ($bbAjaxMode == true && $member == 1) {
print TopCodeAdmin();
print '<link href="' . $site['url_admin'] . 'styles/login_form_ajax.css" rel="stylesheet" type="text/css" />';
print '<div style="border:0px solid #666;width:350px;margin:250px auto 0px;">';
print $_page_cont[0]['page_main_code'];
print '</div>';
print BottomCode();
exit;
}
if ($bbAjaxMode) {
// if ($member == 1) {
// print TopCodeAdmin();
// print '<link href="'.$site['url_admin'].'styles/login_form_ajax.css" rel="stylesheet" type="text/css" />';
// }
print '<div style="border:0px solid #666;width:350px;margin:250px auto 0px;">';
print $_page_cont[0]['page_main_code'];
print '</div>';
// if ($member == 1) {
// print BottomCode();
// }
exit;
}
if ($s1 != $admin_dir && $s1 != "aff" && $s1 != $dir_dir && $s1 != "events" && $s1 != "moderators") {
$_page['name_index'] = 0;
PageCode();
exit;
} else {
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
$_page['header'] = "{$site['title']} {$mem} Login";
TopCodeAdmin();
echo $_page_cont[0]['page_main_code'];
if (strlen($text)) {
?>
<script type="text/javascript">
addEvent( window, 'load', function(){ alert( '<?php
echo $text;
?>
' ); } );
//.........这里部分代码省略.........
示例5: login_form
function login_form($text = "", $member = 0, $bbAjaxMode = false)
{
global $site;
global $_page_cont;
global $_page;
global $admin_dir;
global $logged;
global $dir_dir;
global $dir;
global $tmpl;
global $l, $d;
switch ($member) {
case 0:
$mem = _t("_Member");
$table = "Profiles";
$login_page = "{$site['url']}member.php";
$join_page = "{$site['url']}join.php";
$forgot_page = "{$site['url']}forgot.php";
$template = "{$dir['root']}templates/tmpl_{$tmpl}/login_form.html";
break;
case 1:
$mem = 'Admin';
$table = 'Admins';
$login_page = "{$site['url_admin']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
case 2:
$mem = "Affiliate";
$table = 'aff';
$login_page = "{$site['url_aff']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
case 3:
$mem = "Moderator";
$table = 'moderators';
$login_page = "{$site['url']}moderators/index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}{$admin_dir}/login_form.html";
break;
}
$_page['header'] = "{$site['title']} " . _t("_Member Login");
$_page['header_text'] = _t("_Member Login");
if ($bbAjaxMode && $member == 0) {
$template = "{$dir['root']}templates/tmpl_{$tmpl}/login_form_ajax.html";
} elseif ($bbAjaxMode && $member == 1) {
$template = "{$dir['root']}templates/base/login_form_ajax_a.html";
}
$_page_cont[0]['page_main_code'] = PageCompLoginForm($text, $member, $mem, $table, $login_page, $join_page, $forgot_page, $template);
if ($bbAjaxMode) {
if ($member == 1) {
TopCodeAdmin();
echo '<link href="' . $site['url_admin'] . 'styles/login_form_ajax.css" rel="stylesheet" type="text/css" />';
echo '<div class="login_ajax_wrap">';
echo $_page_cont[0]['page_main_code'];
echo '</div>';
BottomCode();
} else {
echo '<div class="login_ajax_wrap">';
echo $_page_cont[0]['page_main_code'];
echo '</div>';
}
exit;
}
// get name of dir of currently requested php file. Ex.: admin/aff/moderators etc.
// $_SERVER['PHP_SELF'] contains [/some/path/to/file.php]
$sPath = dirname($_SERVER['PHP_SELF']);
//we got [/some/path/to]
$sCDir = basename($sPath);
// get [to].
if ($sCDir == $admin_dir or $sCDir == 'aff' or $sCDir == 'moderators') {
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
$_page['header'] = "{$site['title']} {$mem} Login";
TopCodeAdmin();
echo $_page_cont[0]['page_main_code'];
if (strlen($text)) {
?>
<script type="text/javascript">
addEvent( window, 'load', function(){ alert( '<?php
echo $text;
?>
' ); } );
</script>
<?php
}
BottomCode();
} else {
$_page['name_index'] = 0;
PageCode();
exit;
}
}
示例6: login_form
function login_form($text = "", $member = 0)
{
global $site;
global $_page_cont;
global $_page;
global $admin_dir;
global $logged;
global $dir_dir;
global $dir;
global $tmpl;
global $l, $d;
switch ($member) {
case 0:
$mem = _t("_Member");
$table = "Profiles";
$login_page = "{$site['url']}member.php";
$join_page = "{$site['url']}join_form.php";
$forgot_page = "{$site['url']}forgot.php";
$template = "{$dir['root']}templates/tmpl_{$tmpl}/login_form.html";
break;
case 1:
$mem = 'Admin';
$table = 'Admins';
$login_page = "{$site['url_admin']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}admin/login_form.html";
break;
case 2:
$mem = "Affiliate";
$table = 'aff';
$login_page = "{$site['url_aff']}index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}admin/login_form.html";
break;
case 3:
$mem = "Moderator";
$table = 'moderators';
$login_page = "{$site['url']}moderators/index.php";
$join_page = '';
$forgot_page = '';
$template = "{$dir['root']}admin/login_form.html";
break;
}
$_page['header'] = "{$site['title']} " . _t("_Member Login");
$_page['header_text'] = _t("_Member Login");
// If path is divided with \\ (Windows) then use \\ instead of /
$script_filename = strlen($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : $_SERVER['SCRIPT_NAME'];
if (strstr($script_filename, '/')) {
$arr1 = split("/", $script_filename);
$s1 = $arr1[count($arr1) - 2];
} elseif (strstr($script_filename, '\\\\')) {
$arr1 = split("\\\\", $script_filename);
$s1 = $arr1[count($arr1) - 3];
}
$_page_cont[0]['page_main_code'] = PageCompLoginForm($text, $member, $mem, $table, $login_page, $join_page, $forgot_page, $template);
if ($s1 != $admin_dir && $s1 != "aff" && $s1 != $dir_dir && $s1 != "events" && $s1 != "moderators") {
$_page['name_index'] = 0;
PageCode();
exit;
} else {
require_once BX_DIRECTORY_PATH_INC . 'admin_design.inc.php';
$_page['header'] = "{$site['title']} {$mem} Login";
TopCodeAdmin();
echo $_page_cont[0]['page_main_code'];
if (strlen($text)) {
?>
<script type="text/javascript">
addEvent( window, 'load', function(){ alert( '<?php
echo $text;
?>
' ); } );
</script>
<?php
}
BottomCode();
}
}