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


PHP cpgRedirectPage函数代码示例

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


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

示例1: elseif

            } elseif ($superCage->post->getInt('visiblehookpoints_display') == 0) {
                $value = 0;
            } else {
                $value = 2;
            }
            if ($value != $CONFIG['plugin_visiblehookpoints_display']) {
                $f = cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$value}' WHERE name = 'plugin_visiblehookpoints_display'");
                if (version_compare(COPPERMINE_VERSION, '1.5.1') == -1) {
                    $header_location = @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' : 'Location: ';
                    $redirect = "index.php?file=visiblehookpoints/index&action=config";
                    header($header_location . $redirect);
                    pageheader('Information', "<meta http-equiv=\"refresh\" content=\"0;url={$redirect}\" />");
                    msg_box('Information', 'Settings changed for Visible Hookpoints Plugin', 'continue', $redirect);
                    pagefooter();
                    ob_end_flush();
                    exit;
                } else {
                    cpgRedirectPage('index.php?file=visiblehookpoints/index&action=config', $lang_common['information'], 'Settings changed for Visible Hookpoints Plugin', 1);
                }
            }
        } else {
            $message_id = '';
        }
        pageheader('Configuration of plugin &quot;Visible HookPoints&quot;');
        visiblehookpoints_configure();
        break;
    default:
        cpg_die(ERROR, 'Plugin &quot;Visible HookPoints&quot;: Unknown action value', __FILE__, __LINE__);
}
pagefooter();
ob_end_flush();
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:31,代码来源:index.php

示例2: Copyright

<?php

/**************************************************
  Coppermine 1.5.x Plugin - video2flash_ffmpeg
  *************************************************
  Copyright (c) 2010 Abbas Ali
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
define('IN_COPPERMINE', true);
if (!GALLERY_ADMIN_MODE) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
if (video2flash_ffmpeg_install() !== 1) {
    cpgRedirectPage('pluginmgr.php', $lang_common['information'], 'Plugin settings saved successfully', 1);
}
pageheader('Configure Video to Flash Plugin');
starttable('100%', 'Configure : Video to Flash Plugin');
echo '<tr><td>';
video2flash_ffmpeg_configure();
echo '</tr></td>';
endtable();
pagefooter();
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:settings.php

示例3: form_intercept

function form_intercept()
{
    global $CONFIG, $FAVPICS, $lightbox;
    $superCage = Inspekt::makeSuperCage();
    require_once "./plugins/album_fav_boxes/lang/english.php";
    if ($CONFIG['lang'] != 'english' && file_exists("./plugins/album_fav_boxes/lang/{$CONFIG['lang']}.php")) {
        require_once "./plugins/album_fav_boxes/lang/{$CONFIG['lang']}.php";
    }
    $lightbox['message'] = '';
    $lightbox['icon']['add'] = cpg_fetch_icon('add', 2);
    $lightbox['icon']['delete'] = cpg_fetch_icon('delete', 2);
    $lightbox['icon']['delete_all'] = cpg_fetch_icon('erase', 2);
    $lightbox['icon']['favorites'] = cpg_fetch_icon('favorites', 2);
    $lightbox['icon']['favorite'] = cpg_fetch_icon('favorites', 2);
    // Check if there is something for plugin to process
    if ($superCage->post->keyExists('album_fav_boxes_data')) {
        // If user does not accept script's cookies, we don't accept the vote
        if (!$superCage->cookie->keyExists($CONFIG['cookie_name'] . '_data')) {
            return false;
        }
        $pids = array_map('intval', $superCage->post->getInt('album_fav_boxes_data'));
        $FAVPICS = array_unique(array_merge($FAVPICS, $pids));
        if (count($pids) == 1) {
            $lightbox['message'] = $lightbox['lang']['1 file added to favorites'];
        } else {
            $lightbox['message'] = sprintf($lightbox['lang']['x files added to favorites'], count($pids));
        }
    } elseif ($superCage->post->keyExists('album_fav_boxes_remove')) {
        $pids = array_map('intval', $superCage->post->getInt('album_fav_boxes_remove'));
        if (is_array($pids)) {
            $FAVPICS = array_diff($FAVPICS, $pids);
        }
        if (count($pids) == 1) {
            $lightbox['message'] = $lightbox['lang']['1 file removed from favorites'];
        } else {
            $lightbox['message'] = sprintf($lightbox['lang']['x files removed from favorites'], count($pids));
        }
    } elseif ($superCage->post->keyExists('clear_favs')) {
        $FAVPICS = array();
        cpgRedirectPage('index.php', cpg_fetch_icon('warning', 2) . $lang_common['information'], $lightbox['lang']['Favorites cleared']);
    } else {
        return false;
    }
    $data = base64_encode(serialize($FAVPICS));
    setcookie($CONFIG['cookie_name'] . '_fav', $data, time() + 86400 * 30, $CONFIG['cookie_path']);
    // If the user is logged in then put it in the DB
    if (USER_ID > 0) {
        cpg_db_query("REPLACE INTO {$CONFIG['TABLE_FAVPICS']} ( user_id, user_favpics) VALUES (" . USER_ID . ", '{$data}')");
    }
}
开发者ID:phill104,项目名称:branches,代码行数:50,代码来源:codebase.php

示例4: cpg_db_query

             cpg_db_query($query);
             $update_count++;
         }
         if ($update_count == 0) {
             $returnOutput .= '<li>' . $lang_albmgr_php['no_change'] . '</li>';
         }
         $returnOutput .= '</ul></td></tr>' . $LINEBREAK;
     }
     if ($need_caption) {
         ob_start();
         output_caption();
         $returnOutput .= ob_get_contents();
         ob_end_clean();
     }
     $returnOutput .= '</table>';
     cpgRedirectPage('picmgr.php?aid=' . $album_id, $lang_common['information'], $returnOutput);
     // redirect the user
     break;
 case 'comment':
     //Check if the form token is valid
     if (!checkFormToken()) {
         cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
     }
     $msg_id = $superCage->get->getInt('msg_id');
     $result = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_COMMENTS']} WHERE msg_id = '{$msg_id}'");
     if (!$result->numRows()) {
         cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_comment'], __FILE__, __LINE__);
     } else {
         $comment_data = $result->fetchAssoc();
     }
     $result->free();
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:delete.php

示例5: cpg_db_query

             $sql = 'UPDATE ' . $CONFIG['TABLE_PLUGINS'] . ' SET priority=priority-1 WHERE priority>' . $priority . ';';
             $result = cpg_db_query($sql);
             if ($CONFIG['log_mode']) {
                 log_write("Plugin '" . $name . "' uninstalled", CPG_GLOBAL_LOG);
             }
         }
     }
     break;
 case 'install':
     if (!checkFormToken()) {
         cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
     }
     if ($CONFIG['enable_plugins']) {
         $installed = CPGPluginAPI::install($p);
     } else {
         cpgRedirectPage('pluginmgr.php', $lang_pluginmgr_php['pmgr'], $lang_pluginmgr_php['plugin_disabled_note']);
     }
     break;
 case 'delete':
     if (!checkFormToken()) {
         cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
     }
     $path = $p;
     if (is_bool(strpos('/', $path))) {
         cpg_folder_file_delete('./plugins/' . $path);
         if ($CONFIG['log_mode']) {
             log_write("Plugin '" . $path . "' deleted", CPG_GLOBAL_LOG);
         }
     }
     break;
 case 'moveu':
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:31,代码来源:pluginmgr.php

示例6: define

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.

  ********************************************
  Coppermine version: 1.5.0
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
**********************************************/
define('IN_COPPERMINE', true);
define('LOGOUT_PHP', true);
require 'include/init.inc.php';
if (!USER_ID) {
    cpg_die(ERROR, $lang_logout_php['err_not_loged_in'], __FILE__, __LINE__);
}
if (defined('UDB_INTEGRATION')) {
    $cpg_udb->logout_page();
}
/*
setcookie($CONFIG['cookie_name'] . '_pass', '', time()-86400, $CONFIG['cookie_path']);
setcookie($CONFIG['cookie_name'] . '_uid', '', time()-86400, $CONFIG['cookie_path']);
*/
//$referer = $_GET['referer'] ? $_GET['referer'] : 'index.php';
/*$referer = $superCage->get->keyExists('referer') ? $superCage->get->getRaw('referer') : 'index.php';
if (strpos($referer, "http") !== false) {
  $referer = "index.php";
}*/
cpgRedirectPage($CPG_REFERER, $lang_logout_php['logout'], sprintf($lang_logout_php['bye'], stripslashes(USER_NAME)), 3);
开发者ID:phill104,项目名称:branches,代码行数:30,代码来源:logout.php

示例7: cpg_db_query

        $message = $lang_mode_php['news_hide'];
    }
    cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$value}' WHERE name = 'display_coppermine_news'");
    $CONFIG['display_coppermine_news'] = $value;
    if ($CONFIG['log_mode'] == CPG_LOG_ALL) {
        log_write('CONFIG UPDATE SQL: ' . "UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$value}' WHERE name = 'display_coppermine_news'\n" . 'TIME: ' . date("F j, Y, g:i a") . "\n" . 'USER: ' . $USER_DATA['user_name'], CPG_DATABASE_LOG);
    }
    //$referer = $_GET['referer'] ? $_GET['referer'] : 'index.php';
    /*$referer = $superCage->get->keyExists('referer') ? $superCage->get->getRaw('referer') : 'index.php';
      $referer = rawurldecode($referer);
      $referer = str_replace('&amp;', '&', $referer);
      $referer = str_replace('&amp;', '&', $referer);*/
    cpgRedirectPage($CPG_REFERER, $lang_common['information'], $message, 3);
} else {
    if (!USER_IS_ADMIN) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }
    //if (!isset($_GET['admin_mode']) || !isset($_GET['referer'])) {
    if (!$superCage->get->keyExists('admin_mode') || !$CPG_REFERER) {
        cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);
    }
    // $admin_mode = (int)$_GET['admin_mode'] ? 1 : 0;
    $admin_mode = $superCage->get->getInt('admin_mode') ? 1 : 0;
    //$referer = $_GET['referer'] ? $_GET['referer'] : 'index.php';
    //$referer = $superCage->get->keyExists('referer') ? $superCage->get->getRaw('referer') : 'index.php';
    $USER['am'] = $admin_mode;
    if (!$admin_mode) {
        $CPG_REFERER = 'index.php';
    }
    cpgRedirectPage($CONFIG['ecards_more_pic_target'] . $CPG_REFERER, $lang_common['information'], $lang_mode_php[$admin_mode], 3);
}
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:mode.php

示例8: elseif

            } elseif ($superCage->post->getInt('visiblehookpoints_display') == 0) {
                $value = 0;
            } else {
                $value = 2;
            }
            if ($value != $CONFIG['plugin_visiblehookpoints_display']) {
                $f = cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$value}' WHERE name = 'plugin_visiblehookpoints_display'");
                if (version_compare(COPPERMINE_VERSION, '1.5.1') == -1) {
                    $header_location = @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' : 'Location: ';
                    $redirect = "index.php?file=visiblehookpoints/index&action=config";
                    header($header_location . $redirect);
                    pageheader('Information', "<meta http-equiv=\"refresh\" content=\"0;url={$redirect}\" />");
                    msg_box('Information', $lang_plugin_php['visiblehookpoints_settings_saved'], 'continue', $redirect);
                    pagefooter();
                    ob_end_flush();
                    exit;
                } else {
                    cpgRedirectPage('index.php?file=visiblehookpoints/index&action=config', $lang_common['information'], $lang_plugin_php['visiblehookpoints_settings_saved'], 1);
                }
            }
        } else {
            $message_id = '';
        }
        pageheader($lang_plugin_php['visiblehookpoints_config_name'] . ' - ' . $lang_plugin_php['visiblehookpoints_plugin_config']);
        visiblehookpoints_configure();
        break;
    default:
        cpg_die(ERROR, $lang_plugin_php['visiblehookpoints_error'], __FILE__, __LINE__);
}
pagefooter();
ob_end_flush();
开发者ID:stephenjschaefer,项目名称:APlusPhotography,代码行数:31,代码来源:index.php

示例9: newsletter_install_check

function newsletter_install_check()
{
    global $CPG_PLUGINS, $lang_plugin_newsletter;
    $hit = 0;
    foreach ($CPG_PLUGINS as $installed_plugins) {
        if ($installed_plugins->path == 'newsletter') {
            $hit++;
        }
    }
    if ($hit != 0) {
        return;
    } else {
        cpgRedirectPage('index.php', $lang_plugin_newsletter['outdated_link'], $lang_plugin_newsletter['outdated_link_explain'], 0, 'error');
    }
}
开发者ID:phill104,项目名称:branches,代码行数:15,代码来源:init.inc.php

示例10: add_picture

        // Upload is ok
        // Create thumbnail and internediate image and add the image into the DB
        $result = add_picture($album, $filepath, $picture_name, 0, $title, $caption, $keywords, $user1, $user2, $user3, $user4, $category, $raw_ip, $hdr_ip, $superCage->post->getInt('width'), $superCage->post->getInt('height'));
        if ($result !== true) {
            @unlink($uploaded_pic);
            cpg_die(CRITICAL_ERROR, isset($result['error']) ? $result['error'] : sprintf($lang_db_input_php['err_insert_pic'], $uploaded_pic) . '<br /><br />' . $ERROR, __FILE__, __LINE__, true);
        } elseif ($PIC_NEED_APPROVAL) {
            pageheader($lang_common['information']);
            msg_box($lang_common['information'], $lang_db_input_php['upload_success'], $lang_common['continue'], 'index.php');
            if ($CONFIG['upl_notify_admin_email']) {
                include_once 'include/mailer.inc.php';
                cpg_mail('admin', sprintf($lang_db_input_php['notify_admin_email_subject'], $CONFIG['gallery_name']), make_clickable(sprintf($lang_db_input_php['notify_admin_email_body'], USER_NAME, $CONFIG['ecards_more_pic_target'] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . 'editpics.php?mode=upload_approval')));
            }
            pagefooter();
        } else {
            if (cpg_pw_protected_album_access($CURRENT_PIC_DATA['aid']) === 1) {
                $redirect = "thumbnails.php?album=" . $CURRENT_PIC_DATA['aid'];
            } else {
                $redirect = "displayimage.php?pid=" . $CURRENT_PIC_DATA['pid'];
            }
            cpgRedirectPage($redirect, $lang_common['information'], $lang_db_input_php['upl_success'], 1);
        }
        break;
        // Unknown event
    // Unknown event
    default:
        if ($CONFIG['log_mode'] != 0) {
            log_write('Denied privileged access to db_input.php (unknown event) for user ' . $USER_DATA['user_name'] . ' at ' . $hdr_ip, CPG_SECURITY_LOG);
        }
        cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);
}
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:31,代码来源:db_input.php

示例11: sprintf

    } else {
        if ($CONFIG['enable_watermark'] == '1' && $CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'original') {
            if (resize_image($work_image, $image, $max_size_size, $CONFIG['thumb_method'], $resize_method, 'true')) {
                $output .= '<li>' . $external_edit_icon_array['ok'] . sprintf($lang_plugin_external_edit['watermarked_fullsize'], $lang_plugin_external_edit['created']) . '</li>';
            } else {
                $output .= '<li>' . $external_edit_icon_array['cancel'] . sprintf($lang_plugin_external_edit['watermarked_fullsize'], $lang_plugin_external_edit['failure']) . '</li>';
            }
        } else {
            if ((USER_IS_ADMIN && $CONFIG['auto_resize'] == 1 || !USER_IS_ADMIN && $CONFIG['auto_resize'] > 0) && max($imagesize[0], $imagesize[1]) > $CONFIG['max_upl_width_height']) {
                if (resize_image($work_image, $image, $max_size_size, $CONFIG['thumb_method'], $resize_method, 'false')) {
                    $output .= '<li>' . $external_edit_icon_array['ok'] . sprintf($lang_plugin_external_edit['intermediate'], $lang_plugin_external_edit['created']) . '</li>';
                } else {
                    $output .= '<li>' . $external_edit_icon_array['cancel'] . sprintf($lang_plugin_external_edit['intermediate'], $lang_plugin_external_edit['failure']) . '</li>';
                }
            } elseif (copy($orig, $image)) {
                $output .= '<li>' . $external_edit_icon_array['ok'] . sprintf($lang_plugin_external_edit['original'], $lang_plugin_external_edit['created']) . '</li>';
            } else {
                $output .= '<li>' . $external_edit_icon_array['cancel'] . sprintf($lang_plugin_external_edit['original'], $lang_plugin_external_edit['failure']) . '</li>';
            }
        }
    }
    $output = <<<EOT
\t<ul>
\t{$output}
\t</ul>
EOT;
    if ($CONFIG['log_mode']) {
        log_write('External Edit Plugin:' . $image . '|', CPG_GLOBAL_LOG);
    }
    cpgRedirectPage('displayimage.php?album=' . $aid . '&pid=' . $pid, $lang_plugin_external_edit['importing_remote_image'], $output, $countdown = 0, $type = 'info');
}
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:index.php

示例12: preg_replace

    $sql_query = preg_replace('/CPG_/', $CONFIG['TABLE_PREFIX'], $sql_query);
    cpg_db_query("TRUNCATE TABLE {$CONFIG['TABLE_CONFIG']}");
    cpg_db_query("TRUNCATE TABLE {$CONFIG['TABLE_FILETYPES']}");
    $sql_query = remove_remarks($sql_query);
    $sql_query = split_sql_file($sql_query, ';');
    $sql_count = count($sql_query);
    for ($i = 0; $i < $sql_count; $i++) {
        if (strpos($sql_query[$i], 'config VALUES') || strpos($sql_query[$i], 'filetypes VALUES')) {
            cpg_db_query($sql_query[$i]);
        }
    }
    // undo the reset for config fields specified in $doNotReset_array
    foreach ($doNotReset_array as $key) {
        $f = cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$CONFIG[$key]}' WHERE name = '{$key}'");
    }
    cpgRedirectPage($CPG_PHP_SELF, $lang_common['information'], $lang_admin_php['restore_success']);
}
// user has chosen to factory-reset the config --- end
foreach ($config_data as $config_section_key => $config_section_value) {
    // Loop through the config fields to check posted values for validity -- start
    foreach ($config_section_value as $adminDataKey => $adminDataValue) {
        if ($superCage->post->keyExists('update_config')) {
            $evaluate_value = $superCage->post->getEscaped($adminDataKey);
        } else {
            $evaluate_value = $CONFIG[$adminDataKey];
        }
        // We need to catter for the fact that checkboxes that haven't been ticked are not being submit
        if ($adminDataValue['type'] == 'checkbox' && !$evaluate_value) {
            $evaluate_value = '0';
        }
        if ($adminDataValue['type'] == 'checkbox' && !$CONFIG[$adminDataKey]) {
开发者ID:phill104,项目名称:branches,代码行数:31,代码来源:admin.php

示例13: define

  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.

  ********************************************
  Coppermine version: 1.5.30
  $HeadURL: https://svn.code.sf.net/p/coppermine/code/trunk/cpg1.5.x/logout.php $
  $Revision: 8721 $
**********************************************/
define('IN_COPPERMINE', true);
define('LOGOUT_PHP', true);
require 'include/init.inc.php';
if (!USER_ID) {
    if ($CONFIG['log_mode'] == CPG_LOG_ALL) {
        log_write("Logout attempt failed because visitor is not logged in.", CPG_SECURITY_LOG);
    }
    cpg_die(ERROR, $lang_logout_php['err_not_logged_in'], __FILE__, __LINE__);
}
if (!checkFormToken()) {
    cpg_die(ERROR, $lang_errors['invalid_form_token'], __FILE__, __LINE__);
}
if ($CONFIG['log_mode'] == CPG_LOG_ALL) {
    log_write('The user ' . $USER_DATA['user_name'] . ' (user ID ' . $USER_DATA['user_id'] . ") logged out.", CPG_ACCESS_LOG);
}
if (defined('UDB_INTEGRATION')) {
    $cpg_udb->logout_page();
}
cpgRedirectPage('index.php', $lang_logout_php['logout'], sprintf($lang_logout_php['bye'], stripslashes(USER_NAME)), 3);
// Replace 'index.php' with $CPG_REFERER to redirect the user to the page he came from, with the drawback that the visitor will get an error message if he came from a page that is not accesible for guests
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:31,代码来源:logout.php

示例14: define

**********************************************/
define('IN_COPPERMINE', true);
define('MODE_PHP', true);
require 'include/init.inc.php';
if ($superCage->get->getAlpha('what') == 'news') {
    if (!GALLERY_ADMIN_MODE) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }
    if ($CONFIG['display_coppermine_news'] == 0) {
        $value = 1;
        $message = $lang_mode_php['news_show'];
    } else {
        $value = 0;
        $message = $lang_mode_php['news_hide'];
    }
    cpg_config_set('display_coppermine_news', $value);
    cpgRedirectPage($CPG_REFERER, $lang_common['information'], $message, 3);
} else {
    if (!USER_IS_ADMIN) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }
    if (!$superCage->get->keyExists('admin_mode') || !$CPG_REFERER) {
        cpg_die(CRITICAL_ERROR, $lang_errors['param_missing'], __FILE__, __LINE__);
    }
    $admin_mode = $superCage->get->getInt('admin_mode') ? 1 : 0;
    $USER['am'] = $admin_mode;
    if (!$admin_mode) {
        $CPG_REFERER = 'index.php';
    }
    cpgRedirectPage($CPG_REFERER, $lang_common['information'], $lang_mode_php[$admin_mode], 3);
}
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:31,代码来源:mode.php

示例15: log_write

        if ($superCage->server->testip('REMOTE_ADDR')) {
            $ip = $superCage->server->getRaw('REMOTE_ADDR');
        } else {
            $ip = 'Unknown';
        }
        if (!cpg_mail($CONFIG['gallery_admin_email'], $subject, $html_message, 'text/html', $sender_name, $sender_email, $message)) {
            if ($CONFIG['log_mode'] != CPG_NO_LOGGING) {
                log_write("Sending an email using the contact form failed (name: {$sender_name}, email: {$sender_email}, subject: {$original_subject}, IP: {$ip}", CPG_MAIL_LOG);
            }
            cpg_die(ERROR, $lang_contact_php['failed_sending_email'], __FILE__, __LINE__);
        } else {
            // sending the email has been successfull, redirect the user
            if ($CONFIG['log_mode'] == CPG_LOG_ALL) {
                log_write("Sending email from contact form successful (name: {$sender_name}, email: {$sender_email}, subject: {$original_subject}, IP: {$ip}", CPG_MAIL_LOG);
            }
            cpgRedirectPage($CONFIG['ecards_more_pic_target'] . $CPG_REFERER, $lang_common['information'], $lang_contact_php['email_sent']);
        }
    }
    // beyond this point an error must have happened - let the visitor review his input
} else {
    // the form has not been submit yet - populate default values
    if (!USER_ID && isset($USER['name'])) {
        $user_name = strtr($USER['name'], $HTML_SUBST);
    } else {
        $user_name = $lang_contact_php['your_name'];
    }
    $email_address = '';
    $subject = '';
    $message = '';
    $captcha_remark = $lang_contact_php['captcha_field_mandatory'];
}
开发者ID:stephenjschaefer,项目名称:APlusPhotography,代码行数:31,代码来源:contact.php


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