• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_cp_redirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: admin_login_error

 function admin_login_error($error, array $args = array())
 {
     global $vbulletin;
     if ($vbulletin->GPC['logintype'] === 'cplogin' or $vbulletin->GPC['logintype'] === 'modcplogin') {
         require_once DIR . '/includes/adminfunctions.php';
         $url = unhtmlspecialchars($vbulletin->url);
         $urlarr = vB_String::parseUrl($url);
         $urlquery = $urlarr['query'];
         $oldargs = array();
         if ($urlquery) {
             parse_str($urlquery, $oldargs);
         }
         $args = array_merge($oldargs, $args);
         unset($args['loginerror']);
         $argstr = http_build_query($args);
         $url = "/{$urlarr['path']}?loginerror=" . $error;
         if ($argstr) {
             $url .= '&' . $argstr;
         }
         print_cp_redirect($url);
     }
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:22,代码来源:login.php


示例2: vB_SiteMapRunner_Admin

	$runner = new vB_SiteMapRunner_Admin($vbulletin);

	$status = $runner->check_environment();
	if ($status['error'])
	{
		print_stop_message($status['error']);
	}

	echo '<div>' . construct_phrase($vbphrase['processing_x'], '...') . '</div>';
	vbflush();

	$runner->generate();

	if ($runner->is_finished)
	{
		print_cp_redirect('sitemap.php?do=buildsitemap&success=1');
	}
	else
	{
		echo '<div>' . construct_phrase($vbphrase['processing_x'], $runner->written_filename) . '</div>';

		print_form_header('sitemap', 'dobuildsitemap', false, true, 'cpform_dobuildsitemap');
		print_submit_row($vbphrase['next_page'], 0);
		print_form_auto_submit('cpform_dobuildsitemap');
	}
}

// ########################################################################

print_cp_footer();
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:sitemap.php


示例3: print_cp_redirect

        $vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "postparsed");
    }
    ?>
	<script type="text/javascript">
	<!--

	// refresh the opening window (used for the revert updated default templates action)
	if (window.opener && String(window.opener.location).indexOf("template.php?do=findupdates") != -1)
	{
		window.opener.window.location = window.opener.window.location;
	}

	//-->
	</script>
	<?php 
    print_cp_redirect("template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandset={$template['styleid']}&amp;group=" . $vbulletin->GPC['group'], 1);
}
// #############################################################################
// confirmation for template deletion
if ($_REQUEST['do'] == 'delete') {
    $vbulletin->input->clean_array_gpc('r', array('group' => TYPE_STR));
    $hidden = array();
    $hidden['group'] = $vbulletin->GPC['group'];
    print_delete_confirmation('template', $vbulletin->GPC['templateid'], 'template', 'kill', 'template', $hidden, $vbphrase['please_be_aware_template_is_inherited']);
}
// #############################################################################
// lets the user see the original template
if ($_REQUEST['do'] == 'view') {
    $vbulletin->input->clean_array_gpc('r', array('title' => TYPE_STR));
    $template = $db->query_first("\n\t\tSELECT templateid, styleid, title, template_un\n\t\tFROM " . TABLE_PREFIX . "template\n\t\tWHERE styleid = -1 AND title = '" . $db->escape_string($vbulletin->GPC['title']) . "'\n\t");
    print_form_header('', '');
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:template.php


示例4: vB_Template_Merge_Data

     require_once DIR . '/includes/class_template_merge.php';
     $merge_data = new vB_Template_Merge_Data($vbulletin);
     $merge_data->start_offset = $vbulletin->GPC['startat'];
     $merge_data->add_condition("tnewmaster.product IN ('', 'vbulletin')");
     $merge = new vB_Template_Merge($vbulletin);
     $merge->time_limit = 5;
     $completed = $merge->merge_templates($merge_data);
     if ($completed) {
         // completed
         $vbphrase['style'] = 'Style';
         $vbphrase['please_wait'] = 'Please Wait';
         build_all_styles();
         define('SCRIPT_REDIRECT', true);
     } else {
         // more templates to merge
         print_cp_redirect('tools.php?do=templatemerge&startat=' . ($merge_data->start_offset + $merge->fetch_processed_count()));
     }
 } else {
     if ($_REQUEST['do'] == 'cache') {
         switch ($vbulletin->GPC['type']) {
             case 'forum':
                 build_forum_permissions();
                 define('SCRIPT_REDIRECT', true);
                 break;
             case 'options':
                 build_options();
                 define('SCRIPT_REDIRECT', true);
                 break;
         }
     } else {
         if ($_REQUEST['do'] == 'cookie') {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:tools.php


示例5: datamanager_init

             $path = $vbulletin->options['sigpicpath'] . "/sigpic{$image['userid']}_{$image['sigpicrevision']}.gif";
             if ($filedata = @file_get_contents($path)) {
                 $userpic =& datamanager_init('Userpic_Sigpic', $vbulletin, ERRTYPE_CP, 'userpic');
                 $userpic->set_existing($image);
                 $userpic->setr('filedata', $filedata);
                 $userpic->save();
                 unset($userpic);
             }
             #@unlink($path);
         }
         $vbulletin->options['usefileavatar'] = true;
     }
     $lastuser = $image['userid'];
 }
 if ($lastuser and $db->query_first("\n\t\tSELECT user.userid\n\t\tFROM " . TABLE_PREFIX . "user AS user\n\t\tLEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (user.userid = customavatar.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "sigpic AS sigpic ON (user.userid = sigpic.userid)\n\t\tWHERE user.userid > {$lastuser}\n\t\t\tAND (NOT ISNULL(customavatar.userid) OR NOT ISNULL(customprofilepic.userid) OR NOT ISNULL(sigpic.userid))\n\t\tLIMIT 1\n\t")) {
     print_cp_redirect("avatar.php?" . $vbulletin->session->vars['sessionurl'] . "do=domoveavatar&startat={$finishat}&pp=" . $vbulletin->GPC['perpage']);
     echo "<p><a href=\"avatar.php?" . $vbulletin->session->vars['sessionurl'] . "do=domoveavatar&amp;startat={$finishat}&amp;pp=" . $vbulletin->GPC['perpage'] . "\">" . $vbphrase['click_here_to_continue_processing'] . "</a></p>";
 } else {
     define('CP_REDIRECT', 'avatar.php?do=storage');
     if (!$vbulletin->options['usefileavatar']) {
         // Update $vboptions[]
         $db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = 1 WHERE varname = 'usefileavatar'");
         build_options();
         $db->query_write("UPDATE " . TABLE_PREFIX . "customavatar SET filedata = '', filedata_thumb = ''");
         $db->query_write("UPDATE " . TABLE_PREFIX . "customprofilepic SET filedata = ''");
         $db->query_write("UPDATE " . TABLE_PREFIX . "sigpic SET filedata = ''");
         $db->hide_errors();
         $db->query_write("OPTIMIZE TABLE " . TABLE_PREFIX . "customavatar");
         $db->query_write("OPTIMIZE TABLE " . TABLE_PREFIX . "customprofilepic");
         $db->query_write("OPTIMIZE TABLE " . TABLE_PREFIX . "sigpic");
         $db->show_errors();
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:avatar.php


示例6: IN

            $db->query_write("DELETE FROM " . TABLE_PREFIX . "usernote WHERE userid IN({$userids})");
            echo $vbphrase['okay'] . '</p><p>' . $vbphrase['updating_threads_posts'] . "</p>\n";
            vbflush();
            build_adminutil_text('ids', $userids);
            require_once DIR . '/includes/functions_databuild.php';
            build_user_statistics();
            print_cp_redirect("user.php?" . $vbulletin->session->vars['sessionurl'] . "do=prune_updateposts&startat=0", 1);
            exit;
        } else {
            if ($vbulletin->GPC['dowhat'] == 'move') {
                $group = $db->query_first("\n\t\t\t\tSELECT title\n\t\t\t\tFROM " . TABLE_PREFIX . "usergroup\n\t\t\t\tWHERE usergroupid = " . $vbulletin->GPC['movegroup']);
                echo '<p>' . $vbphrase['updating_users'] . "\n";
                vbflush();
                $db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\t\tSET displaygroupid = IF(displaygroupid = usergroupid, 0, displaygroupid),\n\t\t\t\t\tusergroupid = " . $vbulletin->GPC['movegroup'] . "\n\t\t\t\tWHERE userid IN({$userids})\n\t\t\t");
                echo $vbphrase['okay'] . '</p><p><b>' . $vbphrase['moved_users_successfully'] . '</b></p>';
                print_cp_redirect("user.php?" . $vbulletin->session->vars['sessionurl'] . "do=prune", 1);
            } else {
                $vbulletin->input->clean_array_gpc('r', array('usergroupid' => TYPE_INT, 'daysprune' => TYPE_INT, 'minposts' => TYPE_INT, 'joindate' => TYPE_STR, 'order' => TYPE_STR));
                define('CP_REDIRECT', "user.php?do=pruneusers" . "&usergroupid=" . $vbulletin->GPC['usergroupid'] . "&daysprune=" . $vbulletin->GPC['daysprune'] . "&minposts=" . $vbulletin->GPC['minposts'] . "&joindate=" . $vbulletin->GPC['joindate'] . "&order=" . $vbulletin->GPC['order']);
                print_stop_message('invalid_action_specified');
            }
        }
        if (is_array($query)) {
            foreach ($query as $val) {
                echo "<pre>{$val}</pre>\n";
            }
        }
    } else {
        print_stop_message('please_complete_required_fields');
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:user.php


示例7: error_reporting

 */
/**
 * Header stuff
 */
error_reporting(E_ALL & ~E_NOTICE);
define("AME", true);
$phrasegroups = array('advertising', 'notice', 'ame_admincp');
$specialtemplates = array();
require_once './global.php';
/**
 * Redirects to vB's rebuildvideo function
 * which resets all data back to default
 */
if ($_REQUEST['do'] == 'doresetall') {
    print_cp_header("AME");
    print_cp_redirect('index.php?do=buildvideo');
}
/**
 * A rewritten version of half of vB's similar function. Would be far better moving forward
 * if vB would break the functionality appart as per http://www.vbulletin.com/forum/project.php?issueid=34122
 * Once that gets done Ill revert to it.
 */
if ($_REQUEST['do'] == 'rebuildvideos') {
    $defs = array();
    $codes = $db->query_read_slave("SELECT provider, tagoption, embed FROM " . TABLE_PREFIX . "bbcode_video ORDER BY priority, provider");
    while ($code = $db->fetch_array($codes)) {
        $template .= "<vb:" . ($template ? "else" : "") . "if condition=\"\$provider == '{$code['tagoption']}'\"" . ($template ? "/" : "") . ">\r\n\t{$code['embed']}\r\n";
    }
    $template .= "</vb:if>";
    require_once DIR . '/includes/adminfunctions_template.php';
    $t = compile_template($template);
开发者ID:rcdesign-cemetery,项目名称:vb-foreign_mod_fixes,代码行数:31,代码来源:ame.php


示例8: print_submit_row

    print_submit_row($vbphrase['photoplog_yes'], '', 2, $vbphrase['photoplog_no']);
}
if ($_REQUEST['do'] == 'dodelete') {
    $vbulletin->input->clean_array_gpc('p', array('catid' => TYPE_UINT));
    $photoplog_catid = $vbulletin->GPC['catid'];
    $photoplog_dscatopts = $photoplog_ds_catopts;
    $photoplog_child_list = array();
    $photoplog_parent_list = array();
    photoplog_child_list($photoplog_child_list, $photoplog_parent_list, $photoplog_catid);
    $photoplog_catids_array = array_merge(array($photoplog_catid), $photoplog_child_list, $photoplog_parent_list);
    $photoplog_sql = "WHERE catid = " . intval($photoplog_catid);
    unset($photoplog_dscatopts["{$photoplog_catid}"]);
    if (!empty($photoplog_child_list)) {
        $photoplog_sql = "WHERE catid IN (" . intval($photoplog_catid) . "," . implode(",", $photoplog_child_list) . ")";
        foreach ($photoplog_child_list as $photoplog_childid) {
            unset($photoplog_dscatopts["{$photoplog_childid}"]);
        }
    }
    if ($db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\t\tSET catid = 0\r\n\t\t\t{$photoplog_sql}\r\n\t\t") && $db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\t\tSET catid = 0\r\n\t\t\t{$photoplog_sql}\r\n\t\t") && $db->query_write("DELETE FROM " . PHOTOPLOG_PREFIX . "photoplog_categories\r\n\t\t\t{$photoplog_sql}\r\n\t\t") && $db->query_write("DELETE FROM " . PHOTOPLOG_PREFIX . "photoplog_catcounts\r\n\t\t\t{$photoplog_sql}\r\n\t\t")) {
        $db->query_write("ALTER TABLE " . PHOTOPLOG_PREFIX . "photoplog_categories\r\n\t\t\tORDER BY parentid, displayorder, catid\r\n\t\t");
        // not approved: 0, approved: 1, declined: 2, cat deleted: 3
        $db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_suggestedcats\r\n\t\t\tSET approve = 3\r\n\t\t\t{$photoplog_sql}\r\n\t\t");
        //		photoplog_regenerate_counts_table_v2($photoplog_catids_array);
        photoplog_custom_field_delete_category($photoplog_catid, $photoplog_child_list);
        build_datastore('photoplog_dscat', serialize($photoplog_dscatopts));
        print_cp_redirect("photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify", 1);
    } else {
        print_stop_message('generic_error_x', $vbphrase['photoplog_bad_cat_delete']);
    }
}
print_cp_footer();
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:photoplog_category.php


示例9: while

    while ($cron = $db->fetch_array($crons_result)) {
        $old = $cron['active'] ? 1 : 0;
        $new = $vbulletin->GPC['enabled']["{$cron['varname']}"] ? 1 : 0;
        if ($old != $new) {
            $updates["{$cron['varname']}"] = $new;
        }
    }
    $db->free_result($crons_result);
    if (!empty($updates)) {
        $cases = '';
        foreach ($updates as $varname => $status) {
            $cases .= "WHEN '" . $db->escape_string($varname) . "' THEN {$status} ";
        }
        $db->query_write("UPDATE " . TABLE_PREFIX . "cron SET active = CASE varname {$cases} ELSE active END");
    }
    print_cp_redirect('cronadmin.php?do=modify' . $vbulletin->session->vars['sessionurl_js']);
}
// ###################### Start run cron #######################
if ($_REQUEST['do'] == 'runcron') {
    $vbulletin->input->clean_array_gpc('r', array('cronid' => TYPE_INT, 'varname' => TYPE_STR));
    $nextitem = null;
    if ($vbulletin->GPC['cronid']) {
        $nextitem = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "cron WHERE cronid = " . $vbulletin->GPC['cronid']);
    } else {
        if ($vbulletin->GPC['varname']) {
            $nextitem = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "cron WHERE varname = '" . $db->escape_string($vbulletin->GPC['varname']) . "'");
        }
    }
    if ($nextitem) {
        ignore_user_abort(1);
        @set_time_limit(0);
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:cronadmin.php


示例10: unset

                $dataman->save();
                unset($dataman);
            } else {
                echo $vbphrase['error'];
            }
            // Remove temporary file
            if (!$vbulletin->options['usefileavatar']) {
                @unlink($filename);
            }
            echo '<br />';
            vbflush();
            $finishat = $picture['userid'] > $finishat ? $picture['userid'] : $finishat;
        }
        $finishat++;
        if ($checkmore = $db->query_first("SELECT userid FROM " . TABLE_PREFIX . "customprofilepic WHERE userid >= {$finishat} LIMIT 1")) {
            print_cp_redirect("blog_admin.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuildprofilepic&startat={$finishat}&pp=" . $vbulletin->GPC['perpage']);
            echo "<p><a href=\"blog_admin.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuildprofilepic&amp;startat={$finishat}&amp;pp=" . $vbulletin->GPC['perpage'] . "\">" . $vbphrase['click_here_to_continue_processing'] . "</a></p>";
        } else {
            define('CP_REDIRECT', 'blog_admin.php');
            print_stop_message('updated_profile_pictures_successfully');
        }
    } else {
        define('CP_REDIRECT', 'blog_admin.php');
        print_stop_message('updated_profile_pictures_successfully');
    }
}
if ($_REQUEST['do'] == 'listfe') {
    if (empty($vbulletin->GPC['perpage'])) {
        $vbulletin->GPC['perpage'] = 20;
    }
    ?>
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:blog_admin.php


示例11: photoplog_maintain_postbitcounts

function photoplog_maintain_postbitcounts($photoplog_start, $photoplog_perpage, $photoplog_phase, $header_phrase, $redirect)
{
    global $vbulletin, $vbphrase;
    $photoplog_stop = intval($photoplog_start + $photoplog_perpage);
    print_table_start();
    print_table_header($header_phrase, 1);
    print_cells_row(array('<nobr>' . $vbphrase['photoplog_postbit_file_and_comment_counts'] . '</nobr>'), 1, '', -1);
    $photoplog_table_name = $photoplog_phase ? 'photoplog_ratecomment' : 'photoplog_fileuploads';
    $photoplog_msg = $vbphrase['photoplog_updating'] . ' ' . $photoplog_table_name . ' - ' . $vbphrase['photoplog_table'] . ' ' . TABLE_PREFIX . 'user: ' . $photoplog_start . ' - ' . $photoplog_stop;
    photoplog_update_postbit_counts_interval($photoplog_start, $photoplog_stop, $photoplog_phase);
    print_description_row($photoplog_msg, 0, 1);
    @flush();
    @ob_flush();
    if ($photoplog_phase == 0) {
        print_table_footer();
        if ($photoplog_morecheck = $vbulletin->db->query_first("SELECT userid\r\n\t\t\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_fileuploads\r\n\t\t\t\tWHERE userid >= " . intval($photoplog_stop) . "\r\n\t\t\t\tORDER BY userid ASC\r\n\t\t\t\tLIMIT 1")) {
            $photoplog_stop = intval($photoplog_morecheck['userid']);
            print_cp_redirect($redirect . "?" . $vbulletin->session->vars['sessionurl'] . "do=postbitcounts&phase=0&start=" . $photoplog_stop . "&perpage=" . $photoplog_perpage, 1);
        } else {
            print_cp_redirect($redirect . "?" . $vbulletin->session->vars['sessionurl'] . "do=postbitcounts&phase=1&start=0&perpage=" . $photoplog_perpage, 1);
        }
    } else {
        if ($photoplog_morecheck = $vbulletin->db->query_first("SELECT userid\r\n\t\t\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_ratecomment\r\n\t\t\t\tWHERE userid >= " . intval($photoplog_stop) . "\r\n\t\t\t\tORDER BY userid ASC\r\n\t\t\t\tLIMIT 1")) {
            print_table_footer();
            $photoplog_stop = intval($photoplog_morecheck['userid']);
            print_cp_redirect($redirect . "?" . $vbulletin->session->vars['sessionurl'] . "do=postbitcounts&phase=1&start=" . $photoplog_stop . "&perpage=" . $photoplog_perpage, 1);
        } else {
            print_description_row('<strong>' . $vbphrase['photoplog_done'] . '</strong>', 0, 1);
            print_table_footer();
        }
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:32,代码来源:photoplog_functions.php


示例12: print_next_step

function print_next_step()
{
    global $vbulletin, $numsteps, $installcore_phrases, $vbphrase, $hiddenfields;
    // do nothing if print_next_page() or nextStep has already been called
    if (defined('NONEXTSTEP')) {
        return;
    }
    define('NONEXTSTEP', true);
    // reset $perpage to tell the upgrade log that any multi-page steps are complete
    $vbulletin->GPC['perpage'] = 0;
    $nextstep = $vbulletin->GPC['step'] + 1;
    if ($step >= $numsteps) {
        $formaction = THIS_SCRIPT;
        $buttonvalue = ' ' . $vbphrase['proceed'] . ' ';
        $buttontitle = '';
    } else {
        $formaction = THIS_SCRIPT;
        $buttonvalue = sprintf($installcore_phrases['next_step'], $nextstep, $numsteps);
        $buttontitle = fetch_step_title($nextstep);
        // automatic advance - enable if you want to get through upgrades quickly without reading the text
        if (!defined('HIDEPROCEED') and $vbulletin->GPC['step'] >= 3 and $vbulletin->config['Misc']['upgrade_autoproceed'] and $vbulletin->debug and ($vbulletin->GPC['step'] != 'welcome' or $vbulletin->config['Misc']['upgrade_autoproceed'] == 'full')) {
            print_cp_redirect(THIS_SCRIPT . "?step={$nextstep}", 0.5);
        }
    }
    echo '</div> <!-- end #all -->';
    ?>
	<!-- </div> -->
	<form action="<?php 
    echo $formaction;
    ?>
" method="get" name="nextStep">
	<input type="hidden" name="step" value="<?php 
    echo $nextstep;
    ?>
" />
	<?php 
    foreach ($hiddenfields as $varname => $value) {
        echo "<input type=\"hidden\" name=\"" . htmlspecialchars_uni($varname) . "\" value=\"" . htmlspecialchars_uni($value) . "\" />\r\n";
    }
    ?>
	<table cellpadding="4" cellspacing="0" border="0" width="100%" class="navbody" style="padding:4px; border:outset 2px;">
	<tr align="center">
		<td><?php 
    if (!defined('HIDEPROCEED')) {
        ?>
<b><?php 
        echo $installcore_phrases['click_button_to_proceed'];
        ?>
</b><br /><?php 
    }
    ?>
vBulletin &copy;2000 - <?php 
    echo date('Y');
    ?>
 Jelsoft Enterprises Ltd.</td>
		<td><?php 
    if (!defined('HIDEPROCEED')) {
        ?>
<input type="submit" class="button" accesskey="s" value="<?php 
        echo $buttonvalue;
        ?>
" title="<?php 
        echo $buttontitle;
        ?>
" /><?php 
    }
    ?>
</td>
	</tr>
	</table>
	</form>
	<?php 
}
开发者ID:holandacz,项目名称:nb4,代码行数:73,代码来源:installcore.php


示例13: print_form_header

        print_form_header('forum', 'doorder');
        print_table_header($vbphrase['channel_manager_gforum'], 2);
        print_cells_row(array($vbphrase['channel'], $vbphrase['controls']), 1, 'tcat');
        $cell = array();
        $select = '<select name="nodeid" id="sel_foruid" tabindex="1" class="bginput">';
        $select .= construct_channel_chooser($vbulletin->GPC['nodeid'], true);
        $select .= "</select>\n";
        $cell[] = $select;
        $cell[] = "\n\t<select name=\"controls\" class=\"bginput\">\n" . construct_select_options($channeloptions) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_channel_jump(js_returnid());\" />\n\t";
        print_cells_row($cell);
        print_table_footer(2, construct_button_code($vbphrase['add_new_forum_gforum'], "forum.php?" . vB::getCurrentSession()->get('sessionurl') . "do=add"));
    }
}
// ###################### Start update #######################
if ($_REQUEST['do'] == 'view') {
    $vbulletin->input->clean_array_gpc('r', array('nodeid' => vB_Cleaner::TYPE_UINT));
    $channel = vB_Api::instanceInternal('node')->getNode($vbulletin->GPC['nodeid']);
    if (empty($channel)) {
        print_stop_message2('invalid_channel_specified');
    }
    $path = vB_Api::instanceInternal('route')->getUrl($channel['routeid'], array(), array());
    $baseurl = vB::getDatastore()->getOption('frontendurl');
    print_cp_redirect($baseurl . $path);
}
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
|| # Downloaded: 15:45, Tue Sep 8th 2015
|| # CVS: $RCSfile$ - $Revision: 85086 $
|| #######################################################################
\*=========================================================================*/
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:forum.php


示例14: IN

    if (!$userids) {
        $userids = '0';
    }
    $users = $db->query_read("\n\t\tSELECT userid, username\n\t\tFROM " . TABLE_PREFIX . "user\n\t\tWHERE userid IN ({$userids})\n\t\tLIMIT 0, 50\n\t");
    if ($db->num_rows($users)) {
        while ($user = $db->fetch_array($users)) {
            echo '<p>' . construct_phrase($vbphrase['deleting_user_x'], $user['username']) . "\n";
            vbflush();
            $userdm =& datamanager_init('User', $vbulletin, ERRTYPE_CP);
            $userdm->set_existing($user);
            $userdm->delete();
            unset($userdm);
            echo '<b>' . $vbphrase['done'] . "</b></p>\n";
            vbflush();
        }
        print_cp_redirect("user.php?" . $vbulletin->session->vars['sessionurl'] . "do=dodeleteusers", 0);
        exit;
    } else {
        build_adminutil_text('ids');
        ($hook = vBulletinHook::fetch_hook('useradmin_prune')) ? eval($hook) : false;
        define('CP_REDIRECT', "user.php?do=prune");
        print_stop_message('pruned_users_successfully');
    }
}
// ############################# start list users for pruning #########################
if ($_REQUEST['do'] == 'pruneusers') {
    $vbulletin->input->clean_array_gpc('r', array('usergroupid' => TYPE_INT, 'daysprune' => TYPE_INT, 'minposts' => TYPE_INT, 'joindate' => TYPE_ARRAY_UINT, 'order' => TYPE_STR));
    unset($sqlconds);
    if ($vbulletin->GPC['usergroupid'] != -1) {
        $sqlconds = "WHERE user.usergroupid = " . $vbulletin->GPC['usergroupid'] . ' ';
    }
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:user.php


示例15: print_cp_footer

            print_cp_footer();
        }
    } else {
        if ($vbulletin->GPC['dismiss']) {
            // choosing to forget about the issue
            $adminmessageid = intval($vbulletin->GPC['dismiss'][0]);
            $db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "adminmessage\n\t\t\tSET status = 'dismissed', statususerid = " . $vbulletin->userinfo['userid'] . "\n\t\t\tWHERE adminmessageid = {$adminmessageid}\n\t\t");
        } else {
            if ($vbulletin->GPC['acpnews']) {
                $items = preg_split('#\\s*,\\s*#s', $vbulletin->userinfo['dismissednews'], -1, PREG_SPLIT_NO_EMPTY);
                $items[] = intval($vbulletin->GPC['acpnews'][0]);
                $vbulletin->userinfo['dismissednews'] = implode(',', array_unique($items));
                $admindata =& datamanager_init('Admin', $vbulletin, ERRTYPE_CP);
                if ($getperms = $vbulletin->db->query_first("\n\t\t\tSELECT userid\n\t\t\tFROM " . TABLE_PREFIX . "administrator\n\t\t\tWHERE userid = " . $vbulletin->userinfo['userid'])) {
                    $admindata->set_existing($vbulletin->userinfo);
                } else {
                    $admindata->set('userid', $vbulletin->userinfo['userid']);
                }
                $admindata->set('dismissednews', $vbulletin->userinfo['dismissednews']);
                $admindata->save();
            }
        }
    }
    print_cp_redirect('index.php?do=home' . $vbulletin->session->vars['sessionurl_js']);
}
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 77126 $
|| ####################################################################
\*======================================================================*/
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:index.php


示例16: array

}
// *********************** insert *********************
if ($_POST['do'] == 'insert') {
    $vbulletin->input->clean_array_gpc('p', array('findtext' => TYPE_STR, 'replacetext' => TYPE_STR));
    $vbulletin->GPC['findtext'] = strtolower($vbulletin->GPC['findtext']);
    if ($vbulletin->GPC['findtext'] === '') {
        print_stop_message('please_complete_required_fields');
    }
    if ($existing = $db->query_first("\n\t\tSELECT templateid, styleid, title, template\n\t\tFROM " . TABLE_PREFIX . "template\n\t\tWHERE styleid = " . $vbulletin->GPC['dostyleid'] . "\n\t\t\tAND templatetype = 'replacement'\n\t\t\tAND title = '" . $db->escape_string($vbulletin->GPC['findtext']) . "'\n\t")) {
        print_stop_message('replacement_already_exists', htmlspecialchars($existing['title']), htmlspecialchars($existing['template']), "replacement.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;dostyleid={$existing['styleid']}&amp;templateid={$existing['templateid']}");
    } else {
        /*insert query*/
        $db->query_write("\n\t\t\tINSERT INTO " . TABLE_PREFIX . "template\n\t\t\t\t(styleid, templatetype, title, template)\n\t\t\tVALUES\n\t\t\t\t(" . $vbulletin->GPC['dostyleid'] . ", 'replacement', '" . $db->escape_string($vbulletin->GPC['findtext']) . "', '" . $db->escape_string($vbulletin->GPC['replacetext']) . "')\n\t\t");
        $style = $db->query_first("SELECT styleid, title FROM " . TABLE_PREFIX . "style WHERE styleid = " . $vbulletin->GPC['dostyleid']);
        print_rebuild_style($vbulletin->GPC['dostyleid'], iif($vbulletin->GPC['dostyleid'] == -1, MASTERSTYLE, $style['title']), 0, 0, 1, 0);
        print_cp_redirect("replacement.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify", 1);
    }
}
// *********************** add *********************
if ($_REQUEST['do'] == 'add') {
    print_form_header('replacement', 'insert');
    print_table_header($vbphrase['add_new_replacement_variable']);
    print_style_chooser_row('dostyleid', $vbulletin->GPC['dostyleid'], MASTERSTYLE, $vbphrase['style'], iif($vbulletin->debug == 1, 1, 0));
    print_input_row("{$vbphrase['search_for_text']} <dfn>({$vbphrase['case_insensitive']})</dfn>", 'findtext', '');
    print_textarea_row($vbphrase['replace_with_text'], 'replacetext', '', 5, 50);
    print_submit_row($vbphrase['save']);
}
// *********************** modify *********************
if ($_REQUEST['do'] == 'modify') {
    // ###################### Start displayreplacements #######################
    function print_replacements($parentid = -1, $indent = "\t")
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:replacement.php


示例17: datamanager_init

	");
	while ($post = $db->fetch_array($posts))
	{
		$postman =& datamanager_init('Post', $vbulletin, ERRTYPE_SILENT, 'threadpost');
		$postman->set_existing($post);
		$postman->delete();
		unset($postman);

		echo construct_phrase($vbphrase['processing_x'], $post['postid'])."<br />\n";
		vbflush();
		$gotsome = true;
	}

	if($gotsome)
	{
		print_cp_redirect("misc.php?" . $vbulletin->session->vars['sessionurl'] . "do=removeorphanposts&pp=" . $vbulletin->GPC['perpage'] . "&startat=$finishat");
		echo "<p><a href=\"misc.php?" . $vbulletin->session->vars['sessionurl'] . "do=removeorphanposts&amp;pp=" . $vbulletin->GPC['perpage'] . "&amp;startat=$finishat\">" . $vbphrase['click_here_to_continue_processing'] . "</a></p>";
	}
	else
	{
		define('CP_REDIRECT', 'misc.php');
		print_stop_message('deleted_orphan_posts_successfully');
	}
}

// ###################### Anonymous Survey Code #######################
if ($_REQUEST['do'] == 'survey')
{
	// first we'd like extra phrase groups from the cphome
	fetch_phrase_group('cphome');
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:misc.php


示例18: build_cron_next_run

    require_once DIR . '/includes/functions_cron.php';
    build_cron_next_run();
    build_product_datastore();
    // build bitfields to remove/add this products bitfields
    require_once DIR . '/includes/class_bitfield_builder.php';
    vB_Bitfield_Builder::save($db);
    if (!defined('DISABLE_PRODUCT_REDIRECT')) {
        define('CP_REDIRECT', 'index.php?loc=' . urlencode('plugin.php?do=product'));
    }
    print_stop_message('product_x_uninstalled', $vbulletin->GPC['productid']);
}
// #############################################################################
if ($_REQUEST['do'] == 'productdelete') {
    $vbulletin->input->clean_array_gpc('r', array('productid' => TYPE_STR));
    if (strtolower($vbulletin->GPC['productid']) == 'vbulletin') {
        print_cp_redirect('plugin.php?do=product');
    }
    $dependency_result = $db->query_read("\n\t\tSELECT productid, parentproductid\n\t\tFROM " . TABLE_PREFIX . "productdependency\n\t\tWHERE dependencytype = 'product' AND parentproductid <> ''\n\t");
    // find child products -- these may break if we uninstall this
    $dependency_list = array();
    while ($dependency = $db->fetch_array($dependency_result)) {
        $dependency_list["{$dependency['parentproductid']}"][] = $dependency['productid'];
    }
    $children = fetch_product_dependencies($vbulletin->GPC['productid'], $dependency_list);
    $product_list = fetch_product_list(true);
    $children_text = array();
    foreach ($children as $childproductid) {
        $childproduct = $product_list["{$childproductid}"];
        if ($childproduct) {
            $children_text[] = $childproduct['title'];
        }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:plugin.php


示例19: generate_style


//.........这里部分代码省略.........

	$arr = explode('{', stripslashes($data)); // checked below
	$hex = array(0 => ''); // start at one
	$match = $match2 = array(); // initialize
	$type = 'lps'; // checked below

	foreach ($arr AS $key => $value)
	{
		if (preg_match("/\"hex\":\"([0-9A-F]{6})\"/", $value, $match) == 1)
		{
			$hex[] = '#' . $match[1];
		}
		if (preg_match("/\"type\":\"([a-z0-9]{3})\"/", $value, $match2) == 1)
		{
			$type = $match2[1];
		}
	}

	switch (count($hex))
	{
		case '11':
			break;

		default:
			print_stop_message('incorrect_color_mapping');
	}

	if ($type == 'lps') // Color : Primary and Secondary (except S3 and S4)
	{
		$sample_file = "style_generator_sample_light.xml";
		$from = array('#FF0000', '#BF3030', '#A60000', '#FF4040', '#FF7373', '#009999', '#1D7373', '#5CCCCC');
		$to = array($hex[1], $hex[2], $hex[3], $hex[4], $hex[5], $hex[6], $hex[7], $hex[10]);
	}
	else if ($type == 'lpt') // White : Similar to the current style
	{
		$sample_file = "style_generator_sample_white.xml";
		$from = array('#A60000', '#BF3030', '#FF4040', '#FF7373');
		$to = array($hex[3], $hex[2], $hex[1], $hex[1]);
	}
	else if ($type == 'gry') // Grey :: Primary 3 and Primary 4 only
	{
		$sample_file = "style_generator_sample_gray.xml";
		$from = array('#A60000', '#FF4040');
		$to = array($hex[1], $hex[4]);
	}
	else if ($type == 'drk') // Dark : Primary 3 and Primary 4 only
	{
		$sample_file = "style_generator_sample_dark.xml";
		$from = array('#A60000', '#FF4040');
		$to = array($hex[1], $hex[4]);
	}
	else // Dark : Default to Dark
	{
		$sample_file = "style_generator_sample_dark.xml";
		$from = array('#A60000', '#FF4040');
		$to = array($hex[1], $hex[4]);
	}

	$style = file(DIR . '/includes/xml/' . $sample_file);

	$decode = $match = array();
	foreach($style AS $name => $value) // read in and decode the sample_*.xml file
	{
		if (preg_match("/name=\"(.*)\" value=\"(.*)\"/", $value, $match) == 1)
		{
			$decode[$match[1]] = base64_decode($match[2]);
		}
	}

	$match = array();
	$output = '';
	foreach ($decode AS $name => $value) // replace the RRGGBB in the sample_*.xml file with chosen colors and re-encode
	{
		if (preg_match("/\"(#[a-zA-Z0-9]{6})\"/", $value, $match) == 1)
		{
			$upper = '"' . strtoupper($match[1]) . '"';
			$value = base64_encode(str_replace($from, $to, preg_replace("/\"(#[a-zA-Z0-9]{6})\"/", $upper, $value)));
			$output .= '		<stylevar name="' . $name . '" value="' . $value . '" />
	';
		}
	}
	if($title===''){$title = 'Style ' . time();}
	$output = '<?xml version="1.0" encoding="ISO-8859-1"?>

	<style name="' . $title . '" vbversion="' . $version . '" product="vbulletin" type="custom">
		<stylevardfns>
		</stylevardfns>
		<stylevars>
	' . $output . '	</stylevars>
	</style>
	';

	xml_import_style($output,
		-1, $parentid, $title,
		$anyversion, $displayorder, $userselect
	);

	print_cp_redirect("template.php?" . $vbulletin->session->vars['sessionurl'] . "do=rebuild&amp;goto=template.php?" . $vbulletin->session->vars['sessionurl']);

}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:adminfunctions_template.php


示例20: file_read


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_custom_field函数代码示例发布时间:2022-05-15
下一篇:
PHP print_cp_no_permission函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap