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


PHP BottomCode函数代码示例

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


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

示例1: db_res

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;"';
            $sProf = '<a href="' . $site['url'] . 'profile_edit.php?ID=' . $aData['medProfId'] . '">' . $aData['NickName'] . '</a>';
            $sCode .= '<div class="browseUnit"' . $sStyle . '>';
            $sCode .= '<div class="browseCheckbox"><input type="checkbox" name="Check[]" value="' . $aData['medID'] . '"></div>';
            $sCode .= '<div class="lastFilesPic"><img src="' . $site['url_admin'] . 'images/music.png"></div>';
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:31,代码来源:browseMusic.php

示例2: Main

/**
 * Generating Main page code
 *
 * @return ALL presentation of data
 */
function Main()
{
    $oClassifieds = new BxDolClassifieds();
    $oClassifieds->sCurrBrowsedFile = 'manage_classifieds.php';
    $oClassifieds->bAdminMode = TRUE;
    print $oClassifieds->PrintCommandForms();
    if ($_REQUEST) {
        if (isset($_REQUEST['action'])) {
            if ((int) $_REQUEST['action'] == 3) {
                print $oClassifieds->PrintFilterForm();
                print $oClassifieds->PrintFilteredAllAdvertisements();
                ContentBlockFoot();
                BottomCode();
                return;
            } elseif ((int) $_REQUEST['action'] == 2) {
                $iClassifiedSubID = (int) $_REQUEST['FilterSubCat'];
                print $oClassifieds->PrintSubRecords($iClassifiedSubID, TRUE);
                ContentBlockFoot();
                BottomCode();
                return;
            } elseif ((int) $_REQUEST['action'] == 1) {
                $iClassifiedID = (int) $_REQUEST['FilterCat'];
                print $oClassifieds->PrintAllSubRecords($iClassifiedID);
                ContentBlockFoot();
                BottomCode();
                return;
            }
        } elseif (isset($_GET['bClassifiedID'])) {
            $iClassifiedID = (int) $_GET['bClassifiedID'];
            if ($iClassifiedID > 0) {
                print $oClassifieds->PrintAllSubRecords($iClassifiedID);
                print $oClassifieds->PrintBackLink();
                ContentBlockFoot();
                BottomCode();
                return;
            }
        } elseif (isset($_GET['bSubClassifiedID'])) {
            $iSubClassifiedID = (int) $_GET['bSubClassifiedID'];
            if ($iSubClassifiedID > 0) {
                print $oClassifieds->PrintSubRecords($iSubClassifiedID, TRUE);
                print $oClassifieds->PrintBackLink();
                ContentBlockFoot();
                BottomCode();
                return;
            }
        } elseif (isset($_REQUEST['iAction'])) {
            $sAddMainCatSuccC = MsgBox(_t('_AddMainCategory successfully added'));
            $sAddMainCatFailC = MsgBox(_t('_Failed to Insert AddMainCategory'));
            $sAddSubCatSuccC = MsgBox(_t('_AddSubCategory successfully added'));
            $sAddSubCatFailC = MsgBox(_t('_Failed to Insert AddSubCategory'));
            $sDelMainCatSuccC = MsgBox(_t('_DeleteMainCategory was successfully'));
            $sDelMainCatFailC = MsgBox(_t('_Failed to DeleteMainCategory'));
            $sDelSubCatSuccC = MsgBox(_t('_DeleteSubCategory was successfully'));
            $sDelSubCatFailC = MsgBox(_t('_Failed to DeleteSubCategory'));
            switch ($_REQUEST['iAction']) {
                case 'AddMainCategory':
                    $sName = process_db_input($_REQUEST['name1']);
                    $sDescription = process_db_input($_REQUEST['description1']);
                    $sCustomName1 = process_db_input($_REQUEST['CustomName1']);
                    $sCustomName2 = process_db_input($_REQUEST['CustomName2']);
                    $sCustomAction1 = process_db_input($_REQUEST['CustomAction1']);
                    $sCustomAction2 = process_db_input($_REQUEST['CustomAction2']);
                    if ($sName == '') {
                        print $sAddMainCatFailC;
                        break;
                    }
                    $sqlRes = InsertC($sName, $sDescription, $sCustomName1, $sCustomName2, $sCustomAction1, $sCustomAction2);
                    print mysql_affected_rows() != 0 ? $sAddMainCatSuccC : $sAddMainCatFailC;
                    break;
                case 'AddSubCategory':
                    if ($_REQUEST['FilterCat'] and isset($_REQUEST['name2'])) {
                        $sName = process_db_input($_REQUEST['name2']);
                        $sDescription = process_db_input($_REQUEST['description2']);
                        $sCategoryID = process_db_input($_REQUEST['FilterCat']);
                        if ((int) $sCategoryID < 1) {
                            print $sAddSubCatFailC;
                            break;
                        }
                        $sqlRes = InsertCS($sCategoryID, $sName, $sDescription);
                        print mysql_affected_rows() != 0 ? $sAddSubCatSuccC : $sAddSubCatFailC;
                    }
                    break;
                case 'DeleteMainCategory':
                    if ($_REQUEST['FilterCat']) {
                        $sCategoryID = process_db_input($_REQUEST['FilterCat']);
                        $query = "DELETE FROM `Classifieds` WHERE `ID` = '{$sCategoryID}'";
                        $sqlRes = db_res($query);
                        print mysql_affected_rows() != 0 ? $sDelMainCatSuccC : $sDelMainCatFailC;
                    }
                    break;
                case 'DeleteSubCategory':
                    if ($_REQUEST['SubClassified']) {
                        $sCategoryID = process_db_input($_REQUEST['SubClassified']);
                        $query = "DELETE FROM `ClassifiedsSubs` WHERE `ClassifiedsSubs`.`ID` = {$sCategoryID}";
                        $sqlRes = db_res($query);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:manage_classifieds.php

示例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();
    }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:66,代码来源:BxDolPageViewAdmin.php

示例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;
            ?>
' ); } );
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:admin.inc.php

示例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;
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:96,代码来源:admin.inc.php

示例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();
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:79,代码来源:admin.inc.php


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