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


PHP pagefooter函数代码示例

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


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

示例1: show_memberlist

function show_memberlist()
{
    cpg_db_query("DELETE FROM {$CONFIG['TABLE_USERS']} WHERE user_name = '' LIMIT 1");
    pageheader($lang_usermgr_php['title']);
    list_users();
    pagefooter();
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:7,代码来源:usermgr.php

示例2: message

 function message($title, $message, $link, $time = 2)
 {
     global $CONFIG;
     if ($CONFIG['display_redirection_page'] == 0) {
         header("Location: {$link}&message_id=" . cpgStoreTempMessage($message));
     } else {
         pageheader($title, "<META http-equiv=\"refresh\" content=\"{$time};url={$link}\">");
         msg_box($title, $message, Lang::item('common.continue'), $link);
         pagefooter();
     }
     exit;
 }
开发者ID:phill104,项目名称:branches,代码行数:12,代码来源:forum_helper.php

示例3: slideshow

function slideshow()
{
    global $CONFIG, $template_display_picture, $CPG_M_DIR;
    if (function_exists('theme_slideshow')) {
        theme_slideshow();
        return;
    }
    pageheader(SLIDESHOW_TITLE);
    require_once "includes/coppermine/slideshow.inc";
    $start_slideshow = '<script language="JavaScript" type="text/JavaScript">runSlideShow()</script>';
    template_extract_block($template_display_picture, 'img_desc', $start_slideshow);
    $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100, '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" alt="" /><br />', '{ADMIN_MENU}' => '');
    starttable();
    echo template_eval($template_display_picture, $params);
    endtable();
    starttable();
    echo '
		<tr>
		<td style="text-align:center"  class="navmenu" style="white-space: nowrap;">
		<a href="javascript:endSlideShow()" class="navmenu">' . STOP_SLIDESHOW . '</a>
		</td>
		</tr>
';
    endtable();
    pagefooter();
}
开发者ID:cbsistem,项目名称:nexos,代码行数:26,代码来源:displayimage.php

示例4: cpg_die

function cpg_die($msg_code, $msg_text, $error_file, $error_line, $output_buffer = false)
{
    global $CONFIG, $lang_cpg_die, $template_cpg_die;
    // Simple output if theme file is not loaded
    if (!function_exists('pageheader')) {
        echo 'Fatal error :<br />' . $msg_text;
        exit;
    }
    $ob = ob_get_contents();
    if ($ob) {
        ob_end_clean();
    }
    if (!$CONFIG['debug_mode']) {
        template_extract_block($template_cpg_die, 'file_line');
    }
    if (!$output_buffer && !$CONFIG['debug_mode']) {
        template_extract_block($template_cpg_die, 'output_buffer');
    }
    $params = array('{MESSAGE}' => $msg_text, '{FILE_TXT}' => $lang_cpg_die['file'], '{FILE}' => $error_file, '{LINE_TXT}' => $lang_cpg_die['line'], '{LINE}' => $error_line, '{OUTPUT_BUFFER}' => $ob);
    pageheader($lang_cpg_die[$msg_code]);
    starttable(-1, $lang_cpg_die[$msg_code]);
    echo template_eval($template_cpg_die, $params);
    endtable();
    pagefooter();
    exit;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:26,代码来源:functions.inc.php

示例5: theme_slideshow

function theme_slideshow($start_img, $title)
{
    global $CONFIG, $lang_display_image_php, $template_display_media, $lang_common, $album, $pid, $slideshow;
    global $cat, $date, $THEME_DIR;
    pageheader($lang_display_image_php['slideshow']);
    template_extract_block($template_display_media, 'img_desc', $start_slideshow);
    /** set styles to slideshow background */
    $setDimentionW = $CONFIG['picture_width'] + 100;
    $setDimentionH = $CONFIG['picture_width'] + 10;
    if (defined('THEME_HAS_PROGRESS_GRAPHICS')) {
        $prefix = $THEME_DIR;
    } else {
        $prefix = '';
    }
    $params = array('{SLIDESHOW_STYLE}' => 'width:' . $setDimentionW . 'px; height: ' . $setDimentionH . 'px; position: relative;', '{IMAGE}' => '<img id="showImage" src="' . $start_img . '" class="image" alt="" border="" /><br />', '{ADMIN_MENU}' => '', '{LOADER_ICON_PATH}' => $prefix . 'images/loader.gif');
    echo '<a name="top_display_media"></a>';
    starttable();
    echo <<<EOT
        <tr class="noscript">
            <td align="center" class="tableh2">
              <noscript>
                  {$lang_common['javascript_needed']}
              </noscript>
            </td>
        </tr>
        <tr>
            <td align="center" class="navmenu" style="white-space: nowrap;">
                <div id="title">{$title}</div>
            </td>
        </tr>
EOT;
    endtable();
    starttable();
    echo template_eval($template_display_media, $params);
    endtable();
    starttable();
    echo <<<EOT
        <tr>
                <td align="center" id="back-to" class="navmenu" >
                        <a class="navmenu" style="cursor:pointer">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;
    endtable();
    pagefooter();
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:47,代码来源:theme.php

示例6: html5_display_upload_form


//.........这里部分代码省略.........
    set_js_var('maxchunksize', $h5a_upload->sys_max_chnk_size);
    set_js_var('fup_payload', array('event' => 'picture', 'process' => 1, 'form_token' => $form_token, 'timestamp' => $timestamp, 'MFU' => 1));
    set_js_var('h5uM', array('selAlb' => $lang_plugin_html5upload['albmSelMsg'], 'aborted' => $lang_plugin_html5upload['aborted'], 'type_err' => $lang_plugin_html5upload['type_err'], 'size_err' => $lang_plugin_html5upload['size_err'], 'extallow' => $lang_plugin_html5upload['extallow'], 'q_stop' => $lang_plugin_html5upload['q_stop'], 'q_go' => $lang_plugin_html5upload['q_resume'], 'q_can' => $lang_plugin_html5upload['q_cancel']));
    $allowed_types = array_merge(explode('/', $CONFIG['allowed_img_types']), explode('/', $CONFIG['allowed_mov_types']), explode('/', $CONFIG['allowed_snd_types']), explode('/', $CONFIG['allowed_doc_types']));
    set_js_var('allowed_file_types', $allowed_types);
    // include the javascript upload engine (minified unless in debug mode)
    $jsv = $CONFIG['debug_mode'] == 1 || $CONFIG['debug_mode'] == 2 && GALLERY_ADMIN_MODE ? '' : '.min';
    js_include('plugins/html5upload/js/upload' . $jsv . '.js');
    // add our style sheet
    $h5up_meta = '<link rel="stylesheet" href="plugins/html5upload/css/upload.css" type="text/css" />';
    pageheader($lang_plugin_html5upload['title'], $h5up_meta);
    $upload_help = $h5a_upload->help_button('use');
    $upload_table_header = <<<EOT
\t<table border="0" cellspacing="0" cellpadding="0" width="100%">
\t\t<tr>
\t\t\t<td>
\t\t\t\t{$icon_array['upload']}{$lang_plugin_html5upload['upldfiles']}{$upload_help}
\t\t\t</td>
\t\t\t<td style="text-align:right">
\t\t\t\t<span id="upload_method_selector">{$upload_select}</span>
\t\t\t</td>
\t\t</tr>
\t</table>
EOT;
    starttable('100%', $upload_table_header, 2);
    echo '<tr><td colspan="2" class="tableb tableb_alternate"><strong>' . $maxfilesize . '</strong></td></tr>';
    form_alb_list_box($lang_common['album'], 'h5u_album');
    echo <<<EOT
\t<tr id="navailrow" style="text-align:center;background-color:yellow;display:none">
\t\t<td colspan="2">{$lang_plugin_html5upload['notavail']}</td>
\t</tr>
\t<tr class="H5upV">
\t\t<td class="tableb" width="30%">{$lang_plugin_html5upload['flistitl']}</td>
\t\t<td class="tableb"><input type="checkbox" id="flistitl" onchange="shide_titlrow(this);" /></td>
\t</tr>
EOT;
    if (USER_ID > 0 || $CONFIG['allow_guests_enter_file_details'] == 1) {
        if ($cfg['enabtitl']) {
            echo '<tr id="titlrow"><td class="tableb">' . $lang_upload_php['pic_title'] . '</td><td class="tableb"><input type="text" name="title" id="title" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
        if ($cfg['enabdesc']) {
            $desclabl = $lang_upload_php['description'];
            if ($CONFIG['show_bbcode_help']) {
                $desclabl .= '&nbsp;' . cpg_display_help('f=empty.htm&amp;base=64&amp;h=' . urlencode(base64_encode(serialize($lang_bbcode_help_title))) . '&amp;t=' . urlencode(base64_encode(serialize($lang_bbcode_help))), 470, 245);
            }
            echo '<tr><td class="tableb">' . $desclabl . '</td><td class="tableb"><textarea name="caption" rows="2" id="caption" class="textinput" style="width:90%" /></textarea></td></tr>';
        }
        if ($cfg['enabkeys']) {
            $keywordLabel = sprintf($lang_common['keywords_insert1'], $lang_common['keyword_separators'][$CONFIG['keyword_separator']]) . '<br /><a href="keyword_select.php" class="greybox">' . $lang_common['keywords_insert2'] . '</a>';
            echo '<tr><td class="tableb">' . $keywordLabel . '</td><td class="tableb"><input type="text" name="keywords" id="keywords" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
        if ($cfg['enabusr1'] && !empty($CONFIG['user_field1_name'])) {
            echo '<tr><td class="tableb">' . $CONFIG['user_field1_name'] . '</td><td class="tableb"><input type="text" name="user1" id="user1" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
        if ($cfg['enabusr2'] && !empty($CONFIG['user_field2_name'])) {
            echo '<tr><td class="tableb">' . $CONFIG['user_field2_name'] . '</td><td class="tableb"><input type="text" name="user2" id="user2" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
        if ($cfg['enabusr3'] && !empty($CONFIG['user_field3_name'])) {
            echo '<tr><td class="tableb">' . $CONFIG['user_field3_name'] . '</td><td class="tableb"><input type="text" name="user3" id="user3" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
        if ($cfg['enabusr4'] && !empty($CONFIG['user_field4_name'])) {
            echo '<tr><td class="tableb">' . $CONFIG['user_field4_name'] . '</td><td class="tableb"><input type="text" name="user4" id="user4" class="textinput" maxlength="255" style="width:90%" /></td></tr>';
        }
    }
    $acptmime = $cfg['acptmime'] ? "accept=\"{$cfg['acptmime']}\"" : '';
    echo <<<EOT
\t<tr id="h5upldrow">
\t\t<td class="tableb">{$lang_plugin_html5upload['files']}</td>
\t\t<td class="tableb" style="padding:1em">
\t\t\t<div style="width:480px">
\t\t\t\t<input type="file" name="userpictures" id="upload_field" multiple="multiple" {$acptmime}/>
\t\t\t\t&nbsp;<br />
\t\t\t\t<div id="dropArea">{$lang_plugin_html5upload['drop_files']}</div>
\t\t\t\t&nbsp;<br />
\t\t\t\t<div id="progress_report" style="position:relative">
\t\t\t\t\t<div id="progress_report_name"></div>
\t\t\t\t\t<div id="progress_report_status" style="font-style: italic;"></div>
\t\t\t\t\t<div id="totprogress">
\t\t\t\t\t\t<div id="progress_report_bar" style="background-color: blue; width: 0; height: 100%;"></div>
\t\t\t\t\t</div>
\t\t\t\t\t<div>
\t\t\t\t\t\t{$lang_plugin_html5upload['files_left']}<span id="qcount">0</span><div class="acti" id="qstop"><img src="plugins/html5upload/css/stop.png" title="{$lang_plugin_html5upload['q_stop']}" onclick="H5uQctrl.stop()" /></div><div class="acti" id="qgocan"><img src="plugins/html5upload/css/play-green.png" title="{$lang_plugin_html5upload['q_resume']}" onclick="H5uQctrl.go()" /><img src="plugins/html5upload/css/cross.png" title="{$lang_plugin_html5upload['q_cancel']}" onclick="H5uQctrl.cancel()" /></div>
\t\t\t\t\t</div>
\t\t\t\t\t<div id="fprogress"></div>
\t\t\t\t\t<div id="server_response"></div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</td>
\t</tr>
\t<tr id="gotoedit" style="display:none">
\t\t<td class="tableb tableb_alternate">{$lang_plugin_html5upload['continue']}</td>
\t\t<td class="tableb tableb_alternate">
\t\t\t<button type="button" onclick="window.location=redirURL">{$lang_plugin_html5upload['gotoedit']}</button>
\t\t</td>
\t</tr>
EOT;
    endtable();
    pagefooter();
    exit;
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:101,代码来源:codebase.php

示例7: theme_slideshow

    function theme_slideshow($start_img, $title)
    {
        global $CONFIG, $lang_display_image_php, $template_display_media, $lang_common, $album, $pid, $slideshow;
        global $cat, $date;
        pageheader($lang_display_image_php['slideshow']);
        template_extract_block($template_display_media, 'img_desc', $start_slideshow);
        $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100, '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" id="showImage" />', '{ADMIN_MENU}' => '');
        starttable();
        echo <<<EOT
        <noscript>
        <tr>
            <td align="center" class="tableh2">
              {$lang_common['javascript_needed']}
            </td>
        </tr>
        </noscript>
        <tr>
            <td align="center" class="navmenu" style="white-space: nowrap;">
                <div id="Title">{$title}</div>
            </td>
        </tr>
EOT;
        endtable();
        starttable();
        echo template_eval($template_display_media, $params);
        endtable();
        starttable();
        echo <<<EOT
        <tr>
                <td align="center" class="navmenu" style="white-space: nowrap;">
                        <a class="navmenu" style="cursor:pointer">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;
        endtable();
        pagefooter();
    }
开发者ID:phill104,项目名称:branches,代码行数:38,代码来源:themes.inc.php

示例8: theme_slideshow

function theme_slideshow()
{
    global $CONFIG, $lang_display_image_php, $template_display_media;
    pageheader($lang_display_image_php['slideshow']);
    include "include/slideshow.inc.php";
    $start_slideshow = '<script language="JavaScript" type="text/JavaScript">runSlideShow()</script>';
    template_extract_block($template_display_media, 'img_desc', $start_slideshow);
    $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100, '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" /><br />', '{ADMIN_MENU}' => '');
    starttable();
    echo <<<EOT
        <tr>
            <td align="center" class="navmenu" style="white-space: nowrap;">
                <div id="Title"></div>
            </td>
        </tr>
EOT;
    endtable();
    starttable();
    echo template_eval($template_display_media, $params);
    endtable();
    starttable();
    echo <<<EOT
        <tr>
                <td align="center" class="navmenu" style="white-space: nowrap;">
                        <a href="javascript:endSlideShow()" class="navmenu">{$lang_display_image_php['stop_slideshow']}</a>
                </td>
        </tr>

EOT;
    endtable();
    pagefooter();
}
开发者ID:phill104,项目名称:branches,代码行数:32,代码来源:theme.php

示例9: cpgRedirectPage

/**
* cpgRedirectPage()
*
* Redirect to the target page or display an info screen first and then redirect
*
* @param string $targetAddress
* @param string $caption
* @param string $message
* @param string $countdown
* @return void
**/
function cpgRedirectPage($targetAddress = '', $caption = '', $message = '', $countdown = 0)
{
    global $CONFIG, $lang_common;
    if ($CONFIG['display_redirection_page'] == 0) {
        $header_location = @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' : 'Location: ';
        if (strpos($targetAddress, '?') == FALSE) {
            $separator = '?';
        } else {
            $separator = '&';
        }
        header($header_location . $targetAddress . $separator . 'message_id=' . cpgStoreTempMessage($message) . '#cpgMessageBlock');
        pageheader($caption, "<META http-equiv=\"refresh\" content=\"1;url={$targetAddress}\">");
        msg_box($caption, $message, $lang_common['continue'], $location);
        pagefooter();
        ob_end_flush();
        exit;
    } else {
        pageheader($caption, "<META http-equiv=\"refresh\" content=\"1;url={$targetAddress}\">");
        msg_box($caption, $message, $lang_common['continue'], $location);
        pagefooter();
        ob_end_flush();
        exit;
    }
}
开发者ID:phill104,项目名称:branches,代码行数:35,代码来源:functions.inc.php

示例10: h5u_config_form


//.........这里部分代码省略.........
        } elseif ($uplsiz % 1048576 == 0) {
            $uplsizm = 1;
            $uplsiz = $uplsiz >> 20;
        } else {
            $uplsiz = $uplsiz >> 10;
        }
    } else {
        $uplsiz = '';
    }
    $sizmopts = '';
    foreach (array('K', 'M', 'G') as $k => $v) {
        $selected = $uplsizm == $k ? 'selected="selected"' : '';
        $sizmopts .= "<option value=\"{$k}\" {$selected}>{$v}</option>";
    }
    $sysfmax = $h5a_upload->sys_max_upl_size;
    $sysfmaxh = $h5a_upload->to_KMG($sysfmax);
    $autochecked = $tcfg['autoedit'] ? 'checked="checked" ' : '';
    $titlchecked = $tcfg['enabtitl'] ? 'checked="checked" ' : '';
    $descchecked = $tcfg['enabdesc'] ? 'checked="checked" ' : '';
    $keyschecked = $tcfg['enabkeys'] ? 'checked="checked" ' : '';
    $usr1checked = $tcfg['enabusr1'] ? 'checked="checked" ' : '';
    $usr2checked = $tcfg['enabusr2'] ? 'checked="checked" ' : '';
    $usr3checked = $tcfg['enabusr3'] ? 'checked="checked" ' : '';
    $usr4checked = $tcfg['enabusr4'] ? 'checked="checked" ' : '';
    $enabflds = '';
    if (!empty($CONFIG['user_field1_name'])) {
        $enabflds .= '<br /><input type="checkbox" name="usr1fld" id="usr1fld" ' . $usr1checked . '/> <label for="usr1fld">' . $CONFIG['user_field1_name'] . '</label>';
    }
    if (!empty($CONFIG['user_field2_name'])) {
        $enabflds .= '<br /><input type="checkbox" name="usr2fld" id="usr2fld" ' . $usr2checked . '/> <label for="usr2fld">' . $CONFIG['user_field2_name'] . '</label>';
    }
    if (!empty($CONFIG['user_field3_name'])) {
        $enabflds .= '<br /><input type="checkbox" name="usr3fld" id="usr3fld" ' . $usr3checked . '/> <label for="usr3fld">' . $CONFIG['user_field3_name'] . '</label>';
    }
    if (!empty($CONFIG['user_field4_name'])) {
        $enabflds .= '<br /><input type="checkbox" name="usr4fld" id="usr4fld" ' . $usr4checked . '/> <label for="usr4fld">' . $CONFIG['user_field4_name'] . '</label>';
    }
    $submit_icon = cpg_fetch_icon('ok', 1);
    $rvrtbut = '';
    if ($grpn && $scfg) {
        $undo_icon = cpg_fetch_icon('undo', 1);
        $rvrtbut = '<button value="' . $lang_plugin_html5upload['revert'] . '" name="revert" class="button" type="submit">' . $undo_icon . $lang_plugin_html5upload['revert'] . '&nbsp;</button>&nbsp;&nbsp;';
    }
    echo <<<EOT
\t<tr>
\t\t<td class="tableb" width="50%">
\t\t\t{$lang_plugin_html5upload['select']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<select class="listbox" name="concurrent">{$concopts}</select>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['maxUplSiz']} (PHP:CPG&nbsp;=&nbsp;{$sysfmaxh})
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="text" name="upsize" style="width:4em" maxlength="5" value="{$uplsiz}" />
\t\t\t<select class="listbox" name="upsizem">{$sizmopts}</select>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['acptmime']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="text" name="acptmime" style="width:90%" maxlength="60" value="{$tcfg['acptmime']}" />
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['autoedit']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="checkbox" name="autoedit" {$autochecked}/>
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb">
\t\t\t{$lang_plugin_html5upload['incflds']}
\t\t</td>
\t\t<td class="tableb">
\t\t\t<input type="checkbox" name="titlfld" id="titlfld" {$titlchecked}/> <label for="titlfld">{$lang_common['title']}</label>
\t\t\t<br /><input type="checkbox" name="descfld" id="descfld" {$descchecked}/> <label for="descfld">{$lang_common['caption']}</label>
\t\t\t<br /><input type="checkbox" name="keysfld" id="keysfld" {$keyschecked}/> <label for="keysfld">{$lang_common['keywords']}</label>
\t\t\t{$enabflds}
\t\t</td>
\t</tr>
\t<tr>
\t\t<td class="tableb" colspan="2" style="text-align:center">
\t\t\t{$rvrtbut}<button value="{$lang_common['apply_changes']}" name="save" class="button" type="submit">{$submit_icon}{$lang_common['apply_changes']}&nbsp;</button>
\t\t</td>
\t</tr>
EOT;
    endtable();
    list($timestamp, $form_token) = getFormToken();
    echo "<input type=\"hidden\" name=\"form_token\" value=\"{$form_token}\" />";
    echo "<input type=\"hidden\" name=\"timestamp\" value=\"{$timestamp}\" />";
    pagefooter();
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:101,代码来源:admin.php

示例11: recaptcha_page_start

/**
 * recaptcha_check()
 * check/validate captcha confirmation code [user input] for each page
 *
 * @return
 */
function recaptcha_page_start()
{
    global $lang_continue, $lang_error, $CONFIG, $CAPTCHA_DISABLE, $key_public, $key_private;
    include 'plugins/recaptcha/recaptcha_config.php';
    $recapt_error_back = <<<EOT
<script type="text/javascript">
\tdocument.write('<span style="h3"><a href="#" onclick="history.go(-1);return false;">{$lang_plugin_captcha_error}<br>{$lang_plugin_captcha_goback}</span></a>');
</script>
EOT;
    switch ($_SERVER['PHP_SELF']) {
        case 'db_input.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['comment']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['comment'] == '') {
                if (isset($_POST['msg_body']) && !isset($_POST['msg_id'])) {
                    require_once 'plugins/recaptcha/recaptchalib.php';
                    $privatekey = "{$key_private}";
                    $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if (!$resp->is_valid) {
                        load_template();
                        pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"25;url=displayimage.php?pos=" . -$_POST['pid'] . "\">");
                        msg_box($lang_error, $recapt_error_back);
                        pagefooter();
                        exit;
                    }
                    return;
                }
            }
            break;
        case 'register.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['register']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['register'] == '') {
                if (isset($_POST['submit'])) {
                    require_once 'plugins/recaptcha/recaptchalib.php';
                    $privatekey = "{$key_private}";
                    $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if (!$resp->is_valid) {
                        load_template();
                        pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"25;url=register.php\">");
                        msg_box($lang_error, $recapt_error_back);
                        pagefooter();
                        exit;
                    }
                    return;
                }
            }
            break;
        case 'ecard.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['ecard']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['ecard'] == '') {
                if (isset($_POST['submit'])) {
                    require_once 'plugins/recaptcha/recaptchalib.php';
                    $privatekey = "{$key_private}";
                    $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if (!$resp->is_valid) {
                        load_template();
                        pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"25;url=ecard.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}\">");
                        msg_box($lang_error, $recapt_error_back);
                        pagefooter();
                        exit;
                    }
                    return;
                }
            }
            break;
        case 'report_file.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['report']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['report'] == '') {
                if (count($_POST) > 0) {
                    require_once 'plugins/recaptcha/recaptchalib.php';
                    $privatekey = "{$key_private}";
                    $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if (!$resp->is_valid) {
                        load_template();
                        pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"25;url=report_file.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}\">");
                        msg_box($lang_error, $recapt_error_back);
                        pagefooter();
                        exit;
                    }
                    return;
                }
            }
            break;
        case 'login.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['login']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['login'] == '') {
                if (isset($_POST['submitted'])) {
                    require_once 'plugins/recaptcha/recaptchalib.php';
                    $privatekey = "{$key_private}";
                    $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
                    if (!$resp->is_valid) {
                        load_template();
                        pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"25;url=login.php\">");
                        msg_box($lang_error, $recapt_error_back);
                        pagefooter();
//.........这里部分代码省略.........
开发者ID:phill104,项目名称:branches,代码行数:101,代码来源:codebase.php

示例12: make_form

function make_form($next_form_action, $path_to_preview_image, $path_to_primary_image, $file_name)
{
    global $event;
    global $album;
    global $title;
    global $caption;
    global $keywords;
    global $user1;
    global $user2;
    global $user3;
    global $user4;
    global $lang_image_processor_php;
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    // always modified
    header("Cache-Control: no-store, no-cache, must-revalidate");
    // HTTP/1.1
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    // HTTP/1.0
    pageheader($lang_image_processor_php['page_title']);
    print "<br><br><br>";
    print "<center>";
    print "<img src=\"{$path_to_preview_image}\" alt=\"{$lang_image_processor_php['preview_image_alt_text']}\">";
    print "</center>";
    print "<br>";
    print "<br>";
    print "<form action=\"{$next_form_action}\" method=\"post\">";
    print "<input type=\"hidden\" name=\"album\" value=\"{$album}\">";
    print "<input type=\"hidden\" name=\"title\" value=\"{$title}\">";
    print "<input type=\"hidden\" name=\"caption\" value=\"{$caption}\">";
    print "<input type=\"hidden\" name=\"keywords\" value=\"{$keywords}\">";
    print "<input type=\"hidden\" name=\"user1\" value=\"{$user1}\">";
    print "<input type=\"hidden\" name=\"user2\" value=\"{$user2}\">";
    print "<input type=\"hidden\" name=\"user3\" value=\"{$user3}\">";
    print "<input type=\"hidden\" name=\"user4\" value=\"{$user4}\">";
    print "<input type=\"hidden\" name=\"event\" value=\"{$event}\">";
    print "<input type=\"hidden\" name=\"file_name\" value=\"{$file_name}\">";
    print "<input type=\"hidden\" name=\"transitory_image_path\" value=\"{$path_to_primary_image}\">";
    print "<input type=\"hidden\" name=\"preview_image_path\" value=\"{$path_to_preview_image}\">";
    print "<p>{$lang_image_processor_php['manipulation_query']}</p>";
    print "<br>";
    print "<input type=\"radio\" name=\"degrees\" value=\"no\" checked>{$lang_image_processor_php['no_manipulation']}&nbsp;&nbsp;&nbsp;&nbsp;";
    print "<input type=\"radio\" name=\"degrees\" value=\"90\">90&#176;&nbsp;&nbsp;&nbsp;&nbsp;";
    print "<input type=\"radio\" name=\"degrees\" value=\"180\">180&#176;&nbsp;&nbsp;&nbsp;&nbsp;";
    print "<input type=\"radio\" name=\"degrees\" value=\"270\">270&#176;&nbsp;&nbsp;&nbsp;&nbsp;";
    print "<br><br>";
    print "<input type=\"submit\" value=\"Continue\">";
    print "</form>";
    pagefooter();
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:52,代码来源:image_processor.php

示例13: display_instructions


//.........这里部分代码省略.........
        }
    }
    if (!USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
        print <<<EOT
                <li>{$lang_xp_publish_php['requirement_permissions']}</li>
EOT;
    }
    if (!USER_ID) {
        print <<<EOT
                <li>{$lang_xp_publish_php['requirement_login']}</li>
EOT;
    }
    print <<<EOT
            </ul>
        </td>
    </tr>
    <tr>
        <td class="tableh2">
            <h2>{$lang_xp_publish_php['howto_install']}{$install_help}</h2>
        </td>
    </tr>
    <tr>
        <td class="tableb">
            <ul>
                <li>
EOT;
    printf($lang_xp_publish_php['install_right_click'], '<a href="' . $CPG_PHP_SELF . '?cmd=send_reg">' . cpg_fetch_icon('download', 0), '</a>');
    print <<<EOT
                </li>
                <li>{$lang_xp_publish_php['install_save']}</li>
                <li>{$lang_xp_publish_php['install_execute']}</li>
            </ul>
        </td>
    </tr>
    <tr>
        <td class="tableh2">
            <h2>{$lang_xp_publish_php['usage']}{$usage_help}</h2>
        </td>
    </tr>
    <tr>
        <td class="tableb">
            <ul>
                <li>{$lang_xp_publish_php['select_files']}</li>
                <li>{$lang_xp_publish_php['display_tasks']}</li>
                <li>{$lang_xp_publish_php['publish_on_the_web']}</li>
                <li>{$lang_xp_publish_php['confirm_selection']}, {$lang_xp_publish_php['next']}</li>
                <li>{$lang_xp_publish_php['select_service']}</li>
                <li>{$lang_xp_publish_php['enter_login']}</li>
                <li>{$lang_xp_publish_php['select_album']}, {$lang_xp_publish_php['next']}</li>
                <li>{$lang_xp_publish_php['upload_starts']}</li>
                <li>{$lang_xp_publish_php['upload_completed']}</li>
            </ul>
        </td>
    </tr>
EOT;
    endtable();
    print <<<EOT
<script type="text/javascript">
function os_browser_detection() {
  // browser detection.
  // Usually, browser detection is buggy and should not be used. However, the sidebar works only in mainstream browsers anyway and requires JavaScript, so we can be pretty sure that the user has it enabled if this is supposed to work in the first place.
   var detection_success = 0;
   if (navigator.userAgent.indexOf('Firefox') != -1 || navigator.userAgent.indexOf('Netscape') != -1 || navigator.userAgent.indexOf('Konqueror') != -1 || navigator.userAgent.indexOf('Gecko') != -1) {
       document.getElementById('ie').style.display = 'none';
       document.getElementById('other_browser').style.display = 'block';
       document.getElementById('no_browser_detection').style.display = 'none';
       detection_success = 1;
   }
   if (navigator.userAgent.indexOf('Opera') != -1) {
       document.getElementById('ie').style.display = 'none';
       document.getElementById('other_browser').style.display = 'block';
       document.getElementById('detecting').style.display = 'none';
       detection_success = 1;
   }
   if (navigator.userAgent.indexOf('MSIE') != -1) {
       document.getElementById('ie').style.display = 'block';
       document.getElementById('other_browser').style.display = 'none';
       document.getElementById('no_browser_detection').style.display = 'none';
       detection_success = 1;
   }
   if (navigator.userAgent.indexOf('Windows NT 6.1') != -1 || navigator.userAgent.indexOf('Windows NT 6.0') != -1 || navigator.userAgent.indexOf('Windows NT 5.2') != -1 || navigator.userAgent.indexOf('Windows NT 5.1') != -1) {
       document.getElementById('xp_vista').style.display = 'block';
       document.getElementById('other_os').style.display = 'none';
       document.getElementById('no_os_detection').style.display = 'none';
       detection_success = 1;
   }
   if (navigator.userAgent.indexOf('Windows NT 5.0') != -1 || navigator.userAgent.indexOf('Windows NT 4.0') != -1 || navigator.userAgent.indexOf('Windows 9') != -1 || navigator.userAgent.indexOf('Windows CE') != -1 || navigator.userAgent.indexOf('Mac') != -1 || navigator.userAgent.indexOf('Linux') != -1) {
       document.getElementById('xp_vista').style.display = 'none';
       document.getElementById('other_os').style.display = 'block';
       document.getElementById('no_os_detection').style.display = 'none';
       detection_success = 1;
   }
}


self.onload = os_browser_detection();
</script>
EOT;
    pagefooter();
}
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:101,代码来源:xp_publish.php

示例14: custom_thumb_page_start

function custom_thumb_page_start()
{
    global $CONFIG, $lang_errors;
    $superCage = Inspekt::makeSuperCage();
    if ($superCage->get->keyExists('custom_thmb_id')) {
        $pid = $superCage->get->getInt('custom_thmb_id');
        $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE p.pid = '{$pid}' LIMIT 1");
        $row = mysql_fetch_assoc($result);
        if (!(USER_ADMIN_MODE && $row['category'] == FIRST_USER_CAT + USER_ID || $CONFIG['users_can_edit_pics'] && $row['owner_id'] == USER_ID && USER_ID != 0 || GALLERY_ADMIN_MODE)) {
            load_template();
            cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
        }
        require_once "./plugins/custom_thumb/lang/english.php";
        if ($CONFIG['lang'] != 'english' && file_exists("./plugins/custom_thumb/lang/{$CONFIG['lang']}.php")) {
            require_once "./plugins/custom_thumb/lang/{$CONFIG['lang']}.php";
        }
        if ($superCage->files->keyExists('fileupload') && $row) {
            if (!checkFormToken()) {
                load_template();
                global $lang_errors;
                cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
            }
            $fileupload = $superCage->files->_source['fileupload'];
            if ($fileupload['error']) {
                load_template();
                cpg_die(ERROR, $lang_errors['error'] . ' ' . $fileupload['error'], __FILE__, __LINE__);
            }
            if (is_image($fileupload['name'])) {
                if (!is_image($row['filename'])) {
                    $path_parts = pathinfo($row['filename']);
                    $row['filename'] = basename($row['filename'], '.' . $path_parts['extension']) . '.png';
                }
                $thumb = $CONFIG['fullpath'] . $row['filepath'] . $CONFIG['thumb_pfx'] . $row['filename'];
                if (move_uploaded_file($fileupload['tmp_name'], $thumb) == TRUE) {
                    require 'include/picmgmt.inc.php';
                    if ($superCage->post->keyExists('create_intermediate')) {
                        $normal = $CONFIG['fullpath'] . $row['filepath'] . $CONFIG['normal_pfx'] . $row['filename'];
                        $resize_method = $CONFIG['picture_use'] == "thumb" ? $CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use'] : $CONFIG['picture_use'];
                        resize_image($thumb, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $resize_method);
                    }
                    resize_image($thumb, $thumb, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
                } else {
                    load_template();
                    cpg_die(ERROR, sprintf($lang_plugin_custom_thumb['error_move_file'], $fileupload['tmp_name'], $thumb), __FILE__, __LINE__);
                }
            } else {
                load_template();
                cpg_die(ERROR, $lang_plugin_custom_thumb['error_images_only'], __FILE__, __LINE__);
            }
            header("Location: {$CONFIG['site_url']}displayimage.php?pid={$pid}");
            die;
        } else {
            load_template();
            pageheader($lang_plugin_custom_thumb['custom_thumbnail']);
            echo '<form method="post" enctype="multipart/form-data">';
            starttable('60%', $lang_plugin_custom_thumb['upload_custom_thumbnail'], 2);
            list($timestamp, $form_token) = getFormToken();
            echo <<<EOT
                <tr>
                    <td class="tableb" valign="top">
                        {$lang_plugin_custom_thumb['browse']}
                    </td>
                    <td class="tableb" valign="top">
                        <input type="file" name="fileupload" size="40" class="listbox" />
                    </td>
                </tr>
                <tr>
                    <td class="tableb" valign="top">
                        {$lang_plugin_custom_thumb['create_intermediate']}
                    </td>
                    <td class="tableb" valign="top">
                        <input type="checkbox" name="create_intermediate" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2" class="tablef">
                        <input type="hidden" name="form_token" value="{$form_token}" />
                        <input type="hidden" name="timestamp" value="{$timestamp}" />
                        <input type="submit" name="commit" class="button" value="{$lang_plugin_custom_thumb['upload']}"/>
                    </td>
                </tr>
EOT;
            endtable();
            echo '</form>';
            pagefooter();
            exit;
        }
    }
}
开发者ID:phill104,项目名称:branches,代码行数:89,代码来源:codebase.php

示例15: captcha_page_start

/**
 * captcha_page_start()
 * check/validate captcha confirmation code [user input] for each page
 *
 * @return
 */
function captcha_page_start()
{
    global $lang_continue, $lang_error, $lang_plugin_captcha_conf, $CONFIG, $CAPTCHA_DISABLE, $CAPTCHA_TIMEOUT;
    /*                              Setting Options                                        */
    /**
     * Enable/Disable array
     *
     * Set which group should NOT see Captcha on each page
     * ''=> Captcha Enable for all users
     * COppermine Standard Group Name:
     * Administrators,Registered,Guests,Banned
     * You can add your custome group name too
     * Seprated by ','
     */
    $CAPTCHA_DISABLE = array('login' => 'Administrators,Registered,Guests', 'register' => 'Administrators,Registered', 'comment' => 'Administrators,Registered', 'report' => 'Administrators', 'ecard' => 'Administrators');
    $CAPTCHA_TIMEOUT = 300;
    // How many sec should passed before we remove the code from database
    require 'plugins/captcha/include/init.inc.php';
    require 'plugins/captcha/include/captcha.class.php';
    switch ($_SERVER['PHP_SELF']) {
        case 'login.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['login']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['login'] == '') {
                if (isset($_POST['submitted']) and !Validate($_POST['confirmCode'])) {
                    load_template();
                    pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"3;url=login.php\">");
                    msg_box($lang_error, "{$lang_plugin_captcha_error}", $lang_continue, 'login.php');
                    pagefooter();
                    exit;
                }
            }
            break;
        case 'register.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['register']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['register'] == '') {
                if (isset($_POST['submit']) and !Validate($_POST['confirmCode'])) {
                    load_template();
                    pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"3;url=register.php\">");
                    msg_box($lang_error, "{$lang_plugin_captcha_error}", $lang_continue, 'register.php');
                    pagefooter();
                    exit;
                }
            }
            break;
        case 'db_input.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['comment']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['comment'] == '') {
                if (isset($_POST['msg_body']) and !Validate($_POST['confirmCode'])) {
                    load_template();
                    pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"3;url=displayimage.php?pos=" . -$_POST['pid'] . "\">");
                    msg_box($lang_error, "{$lang_plugin_captcha_error}", $lang_continue, "displayimage.php?pos=" . -$_POST['pid']);
                    pagefooter();
                    exit;
                }
            }
            break;
        case 'report_file.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['report']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['report'] == '') {
                if (count($_POST) > 0 and !Validate($_POST['confirmCode'])) {
                    load_template();
                    pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"3;url=report_file.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}\">");
                    msg_box($lang_error, "{$lang_plugin_captcha_error}", $lang_continue, "report_file.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}");
                    pagefooter();
                    exit;
                }
            }
            break;
        case 'ecard.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['ecard']);
            if (!in_array(USER_GROUP, $valid_groups) or $CAPTCHA_DISABLE['ecard'] == '') {
                if (count($_POST) > 0 and !Validate($_POST['confirmCode'])) {
                    load_template();
                    pageheader($lang_error, "<META http-equiv=\"refresh\" content=\"3;url=ecard.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}\">");
                    msg_box($lang_error, "{$lang_plugin_captcha_error}", $lang_continue, "ecard.php?album={$_GET['album']}&pid={$_GET['pid']}&pos={$_GET['pos']}");
                    pagefooter();
                    exit;
                }
            }
            break;
        default:
    }
    // switch
}
开发者ID:alencarmo,项目名称:OCF,代码行数:90,代码来源:codebase.php


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