本文整理汇总了PHP中catcherror函数的典型用法代码示例。如果您正苦于以下问题:PHP catcherror函数的具体用法?PHP catcherror怎么用?PHP catcherror使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了catcherror函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acceptrequest
$backtofmp_list = "{$lanfp[0]}{$lanfp[13]}{$lanfp[1]}|admin.php?act={$page['list']}";
acceptrequest('configjob');
if ($configjob == 'save_config') {
$savetext = "<?PHP\n";
$save_config = $_POST['prefconfig'];
if (count($save_config) <= 1) {
catcherror($lna[1013]);
}
while (@(list($key, $val) = @each($save_config))) {
$savetext .= "\$fmp_cfg['{$key}']='" . admin_convert($val) . "';\n";
}
if ($savetext == '') {
catcherror($lna[1013]);
}
if (!writetofile($file['dcfg'], $savetext)) {
catcherror("{$lna[66]}" . $file['dcfg']);
} else {
catchsuccess($finishok, array($backtofmp_cfg, $backtofmp_list, $backtoplugin));
}
}
$plugin_header = <<<eot
<style type="text/css">
.pd3 {
\tpadding:2px;
}
</style>
eot;
$pref_leftchar = "200";
$pref_variable = "fmp_cfg";
include $file['dcfg'];
$ow = array("?", "=", "&");
示例2: acceptrequest
<div style='visibility: hidden'><input type=submit value="{$lna[64]}" id='realsubmit' class='formbutton'></div>
</form>
eot;
}
if ($job == 'store' || $job == 'restore') {
acceptrequest('pagetitle,closesidebar,html,ubb,emot,useeditor,pagealias,addshortcut,shortcuttarget,shortcutname', 0, 'post');
//Get content
$content = $_POST['content'];
//If magic quotes is on, strip the slashes automatically added
if ($mqgpc_status == 1) {
$content = stripslashes($content);
}
if ($pagetitle == '' || $content == '') {
$cancel = $lna[307];
}
catcherror($cancel);
$closesidebar = @floor($closesidebar);
$htmlstat = @floor($html);
$ubbstat = @floor($ubb);
$emotstat = @floor($emot);
$pageid = @floor($id);
if ($autobr == 0) {
$content = str_replace("\r", '', $content);
//Disable auto linebreak in WYSIWYG editors
}
if ($callaftersubmit) {
$content = call_user_func($callaftersubmit, $content);
}
$content = preg_replace("/\\[php\\](.+?)\\[\\/php\\]/ise", "phpcode3('\\1')", $content);
if ($htmlstat != 1 || $permission['Html'] != 1) {
$content = preg_replace("/\\[code\\](.+?)\\[\\/code\\]/ise", "phpcode2('\\1')", $content);
示例3: acceptrequest
if ($job == 'ajaxverify') {
acceptrequest('savecookie,securitycode');
$savecookie = floor($savecookie);
if ($config['loginvalidation'] == 1) {
if ($db_defaultsessdir != 1) {
session_save_path("./{$db_tmpdir}");
}
session_cache_limiter("private, must-revalidate");
session_start();
if ($securitycode == '' || strtolower($securitycode) != strtolower($_SESSION['code'])) {
catcherror($lnc[165]);
}
}
$password = md5($_POST['password']);
$username = safe_convert(mystrtolower($_POST['username']));
$try = $blog->getbyquery("SELECT * FROM `{$db_prefix}user` WHERE LOWER(username)='{$username}' AND `userpsw`='{$password}'");
if (!is_array($try)) {
catcherror($lnc[166]);
} else {
$userid = $try['userid'];
catchsuccess("{$userid}-{$password}-{$savecookie}");
}
}
if ($job == 'ajaxloginsuccess') {
if ($permission['CP'] == 1) {
$destine = array("{$lnc[163]}|index.php", "{$lnc[107]}|admin.php");
} else {
$destine = "{$lnc[163]}|index.php";
}
catchsuccess("{$lnc[167]} " . $userdetail['username'], $destine);
}
示例4: announcebar
announcebar();
$iftoppage = $mbcon['pagebarposition'] == 'down' ? 'none' : 'block';
$ifbottompage = $mbcon['pagebarposition'] == 'up' ? 'none' : 'block';
$bodymenu = $t->set('mainpage', array('pagebar' => $pagebar, 'iftoppage' => $iftoppage, 'ifbottompage' => $ifbottompage, 'ifannouncement' => $ifannouncement, 'topannounce' => $topannounce, 'mainpart' => $section_body_main, 'currentpage' => $pageitems['currentpage'], 'previouspageurl' => $pageitems['previouspageurl'], 'nextpageurl' => $pageitems['nextpageurl'], 'turningpages' => $pageitems['turningpages'], 'totalpages' => $pageitems['totalpages'], 'previouspageexists' => $pageitems['previouspageexists'], 'nextpageexists' => $pageitems['nextpageexists']));
$pagetitle = "Tags - ";
}
if ($job == 'show') {
acceptrequest('mode');
if ($mode == 1 || $mode == 2) {
$mbcon['tag_list'] = $mode - 1;
} else {
$mode = $mbcon['tag_list'] + 1;
}
$m_b = new getblogs();
if ($tag === '') {
catcherror($lnc[192]);
}
$tag = str_replace(''', "\\'", $tag);
$allentries = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}tags` WHERE `tagname`='{$tag}' LIMIT 0,1");
if (!is_array($allentries[0]) || $allentries[0]['tagentry'] == '<end>' || $allentries[0]['tagcounter'] == 0) {
$section_body_main[] = "<br/><div align='center'><span style='font-size: 14px;'>{$lnc[186]}</span></div><br/>";
} else {
$taginfo = $allentries[0];
$entries_query = str_replace(',<end>', '', $taginfo['tagentry']);
$entries_query = str_replace('<tag>,', '', $entries_query);
$partialquery = "WHERE `blogid` IN ({$entries_query}) AND `property`<'2' ORDER BY `sticky` DESC, `pubtime` DESC";
if ($mbcon['tag_list'] == 1) {
$records = $m_b->new_record_array($partialquery, $mbcon['listitemperpage'], $page);
$listbody = $m_b->make_excerption($records, 'list');
$section_body_main[] = $m_b->make_list(@implode('', $listbody));
$perpagevalue = $mbcon['listitemperpage'];
示例5: acceptrequest
$backtolightconfig = "dp.SyntaxHighlighter For UBB|admin.php?act={$act}";
acceptrequest('configjob');
if ($configjob == 'save') {
$savetext = "<?PHP\n";
$save_config = $_POST['prefconfig'];
if (count($save_config) <= 1) {
catcherror($lna[1013]);
}
while (@(list($key, $val) = @each($save_config))) {
$savetext .= "\$dp_config['{$key}']='" . admin_convert($val) . "';\n";
}
if ($savetext == '') {
catcherror($lna[1013]);
}
if (!writetofile("plugin/{$act}/config.php", $savetext)) {
catcherror("{$lna[66]}" . "plugin/{$act}/config.php");
} else {
catchsuccess($lanic[$select_include_n] . $lanic[9], array($backtoplugin, $backtolightconfig));
}
}
$pref_leftchar = "200";
$pref_variable = "dp_config";
include "plugin/{$act}/config.php";
addpref("r", "Cpp|C|{$lna[511]}|{$lna[512]}");
addpref("r", "CSharp|C#|{$lna[511]}|{$lna[512]}");
addpref("r", "Vb|Visual Basic|{$lna[511]}|{$lna[512]}");
addpref("r", "Delphi|Delphi|{$lna[511]}|{$lna[512]}");
addpref("r", "Python|Python|{$lna[511]}|{$lna[512]}");
addpref("r", "Ruby|Ruby|{$lna[511]}|{$lna[512]}");
addpref("r", "Java|JAVA|{$lna[511]}|{$lna[512]}");
addpref("r", "Sql|SQL|{$lna[511]}|{$lna[512]}");
示例6: unset
for ($i = 0; $i < count($wlink); $i++) {
$link = @explode('<|>', $wlink[$i]);
if (@in_array($link[1], $selid)) {
$wlink[$i] = '';
}
unset($link);
}
$allnow = @implode('', $wlink);
if ($allnow == '') {
@unlink($filename);
} else {
writetofile($filename, $allnow);
}
} elseif ($opt == 'accept' || $opt == 'textonly') {
if ($newlinkgptoid === '') {
catcherror($lna[264]);
} else {
$newlinkgptoid = floor($newlinkgptoid);
}
$linkid = $maxrecord['maxlinkid'];
for ($i = 0; $i < count($wlink); $i++) {
$link = @explode('<|>', $wlink[$i]);
if (@in_array($link[1], $selid)) {
$linklogo = $opt == 'textonly' ? '' : $link[4];
$linkid += 1;
$plinkout[] = "('{$linkid}', '{$link[2]}', '{$link[3]}', '{$linklogo}', '{$link[5]}', '{$newlinkgptoid}', '{$linkid}', '1', '', '')";
$wlink[$i] = '';
}
unset($link);
}
$link_query = @implode(',', $plinkout);
示例7: Copyright
Bo-Blog 2 : The Blog Reloaded.
<<A Bluview Technology Product>>
禁止使用Windows记事本修改文件,由此造成的一切使用不正常恕不解答!
PHP+MySQL blog system.
Code: Bob Shen
Offical site: http://www.bo-blog.com
Copyright (c) Bob Shen 中国-上海
In memory of my university life
------------------------------------------------------- */
if (!defined('VALIDREQUEST')) {
die('Access Denied.');
}
acceptrequest('pageid,pagealias');
$itemid = $pagealias ? safe_convert($pagealias) : floor($pageid);
$m_b = new getblogs();
$records = $pagealias ? $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}pages` WHERE `pagealias`='{$itemid}'") : $m_b->getgroupbyquery("SELECT * FROM `{$db_prefix}pages` WHERE `pageid`='{$itemid}'");
if (is_array($records)) {
$section_body_main = $m_b->output_page($records[0]);
} else {
catcherror($lnc[186]);
}
//Load plugins
$section_body_main[0] = plugin_get('custompagebegin') . $section_body_main[0];
$section_body_main[] = plugin_get('custompageend');
$plugin_closesidebar = $records[0]['closesidebar'] == 1 ? 0 : 1;
if ($plugin_closesidebar == 1) {
$elements['mainpage'] = str_replace("class=\"content\"", "class=\"content-wide\"", $elements['mainpage']);
}
$ifannouncement = "none";
$bodymenu = $t->set('mainpage', array('pagebar' => '', 'iftoppage' => 'none', 'ifbottompage' => 'none', 'ifannouncement' => 'none', 'topannounce' => '', 'mainpart' => @implode('', $section_body_main), 'previouspageexists' => '', 'nextpageexists' => ''));
$pagetitle = "{$records[0]['pagetitle']} × ";
示例8: admin_convert
}
$savelnum = @explode(',', $newlnums);
$saveldesc = @explode(',', $newldescs);
$savedata = $savedata2 = "<?php\n";
for ($i = 0; $i < count($savelnum); $i++) {
if ($savelnum[$i] == '') {
continue;
}
$savedata .= "\$lnc[{$savelnum[$i]}]='" . admin_convert($saveldesc[$i]) . "';\n";
$savedata2 .= "\$lncoverwrite[{$savelnum[$i]}]='" . admin_convert($saveldesc[$i]) . "';\n";
}
if (!writetofile("data/langspec.php", $savedata)) {
catcherror($lna[66] . "data/langspec.php");
}
if (!writetofile("data/langspecoverwrite.php", $savedata2)) {
catcherror($lna[66] . "data/langspecoverwrite.php");
}
catchsuccess($finishok4, $backtolangspec);
}
function skin_convert($str)
{
$str = str_replace("\r", '', $str);
$str = str_replace("\n", '', $str);
$str = addslashes($str);
$str = str_replace('|', '', $str);
return $str;
}
function add_module($filename)
{
global $activate, $newplugindir, $blog, $db_prefix;
if (is_file("plugin/{$newplugindir}/{$filename}")) {
示例9: catcherror
}
if ($blogpsw != $records['blogpsw']) {
catcherror($lnc[297]);
}
$return_main = $m_b->make_viewentry($records, $way, true);
setcookie("entrypassword{$blogid}", $blogpsw);
catchsuccess($return_main);
}
if ($job == 'getreplyonly') {
acceptrequest('repid,reppsw,way,onetimecounter');
$repid = floor($repid);
$reppsw = md5($reppsw);
$tablename = $way == 'reply' ? 'replies' : 'messages';
$partialquery = "SELECT * FROM `{$db_prefix}{$tablename}` WHERE `repid`='{$repid}' LIMIT 1";
$m_b = new getblogs();
$records = $m_b->getbyquery($partialquery);
if (!is_array($records) || $records['repid'] != $repid) {
catcherror($lnc[305]);
}
if ($reppsw != $records['reppsw']) {
catcherror($lnc[297]);
}
$records['reppsw'] = '';
$records['reproperty'] = '0';
if ($way == 'reply') {
$output_single = $m_b->single_reply($records, floor($onetimecounter));
} else {
$output_single = $m_b->single_message($records, floor($onetimecounter));
}
catchsuccess($output_single);
}
示例10: recache_plugins
function recache_plugins()
{
global $blog, $db_prefix, $lna;
$all_pl = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}plugins` WHERE `active`=1 ORDER BY `plid` ASC");
if (is_array($all_pl)) {
foreach ($all_pl as $plugin) {
if ($plugin['plregister']) {
$register = @explode(',', str_replace(' ', '', $plugin['plregister']));
foreach ($register as $singlereg) {
$blogplugin[$singlereg][] = $plugin['plname'];
}
}
}
}
if (is_array($blogplugin)) {
foreach ($blogplugin as $typename => $plugins) {
$pluginline = '"' . @implode(',', $plugins) . '"';
$plugwrt[] = "\$blogplugin['{$typename}']={$pluginline};\r\n";
}
$out = "<?PHP\r\n" . @implode('', $plugwrt);
}
if (!writetofile("data/plugin_enabled.php", $out)) {
catcherror($lna[66] . "data/plugin_enabled.php");
}
}
示例11: acceptrequest
if ($job == 'dolangset') {
acceptrequest('newlangf,newlangb');
if (!file_exists("lang/{$newlangf}/common.php")) {
catcherror("Front-end langauge pack does not exist. 前台语言包不存在。 前臺語言包不存在。");
}
if (!file_exists("lang/{$newlangb}/backend.php")) {
catcherror("Back-end langauge pack does not exist. 后台语言包不存在。 後臺語言包不存在。");
}
$newcontent = "<?PHP\n\$langfront=\"{$newlangf}\";\n\$langback=\"{$newlangb}\";\n@include_once (\"lang/{$newlangf}/common.php\");";
writetofile("data/language.php", $newcontent);
catchsuccess("Language set has been changed. 语言包设置完成。 語言包設置完成。");
}
if ($job == 'refreshadminskinlist' || $job == 'selectadminskin') {
$handle = opendir("admin/theme/");
if (!$handle) {
catcherror("{$lna[155]} admin/theme/ {$lna[156]}<ul><li>{$lna[157]}</li><li>{$lna[158]}</li><li>{$lna[159]}</li></ul>");
}
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && is_dir("admin/theme/{$file}")) {
$out .= "\$adminskin[]='{$file}';\n";
}
}
if ($job == 'selectadminskin') {
acceptrequest('targetskin');
$targetskin = basename($targetskin);
if ($targetskin) {
$currentadminskin = $targetskin;
}
}
$sleout = "<?PHP\n" . $out . "\$currentadminskin='{$currentadminskin}';";
writetofile("data/cache_adminskinlist.php", $sleout);
示例12: catcherror
$y2++;
for ($y = $y1; $y <= $y2; $y++) {
if ($y == $y2) {
$var['beforeYearOptions'] .= "<option value=\"{$y}\" selected>{$y}</option>\n";
} else {
$var['beforeYearOptions'] .= "<option value=\"{$y}\">{$y}</option>\n";
}
}
}
// Calculate the length of a menu, shrink if we have settings disabled
if ($filename == "html/{$atmail->Language}/xp/toolbar.html" || $filename == "html/{$atmail->Language}/xp/toolbar_abook.html") {
$var = $atmail->calcmenu_height($filename);
}
// Die if the file is not permitted
if (!$type[$filename]) {
catcherror("Specified file {$filename} is not allowed");
}
$var['FirstLoad'] = $_REQUEST['FirstLoad'];
// If using the help menu, load the selected help-file or default to the settings
if ($filename == "html/{$atmail->Language}/help/filexp.html" && $_REQUEST['HelpFile']) {
if ($_REQUEST['HelpFile']) {
$var['HelpFile'] = $_REQUEST['HelpFile'];
} else {
$var['HelpFile'] = 'file.html';
}
}
if (!$_REQUEST['XUL']) {
$var['atmailstyle'] .= $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/atmailstyle-form.css");
}
/*
if($_REQUEST['ajax']) {
示例13: while
$savetext = "<?PHP\n";
$save_list = $_POST['fmp'];
//if (count($save_list)<=0) catcherror ($lna[1013]);
while (@(list($key, $val) = @each($save_list))) {
while (@(list($val_key, $val_value) = @each($val))) {
if ($val_key == 'title' && empty($val_value)) {
break;
}
if (!empty($val_value)) {
$savetext .= "\$fmp_list['{$key}']['{$val_key}']='" . admin_convert($val_value) . "';\n";
}
}
}
//if ($savetext=='') catcherror ($lna[1013]);
if (!writetofile($file['dlist'], $savetext)) {
catcherror("{$lna[66]}" . $file['dlist']);
} else {
catchsuccess($finishok, array($backtofmp_list, $backtofmp_cfg, $backtoplugin));
}
}
include $file['dlist'];
foreach ($fmp_list as $fp_id => $fp_song) {
//$fmp_list_show .= "add_fpRow('{$fp_id}','{$fmp_list[$fp_id][title]}','{$fmp_list[$fp_id][creator]}','{$fmp_list[$fp_id][location]}','{$fmp_list[$fp_id][info]}','{$fmp_list[$fp_id][image]}','{$fmp_list[$fp_id][album]}','{$fmp_list[$fp_id][meta]}')\n";
//$fmp_list_show .= "add_fpRow('{$fp_id}','".htmlspecialchars($fmp_list[$fp_id][title]). "','" .htmlspecialchars($fmp_list[$fp_id][creator]). "','" .htmlspecialchars($fmp_list[$fp_id][location]). "','" .htmlspecialchars($fmp_list[$fp_id][info]). "','" .htmlspecialchars($fmp_list[$fp_id][image]). "','" .htmlspecialchars($fmp_list[$fp_id][album]). "','" .htmlspecialchars($fmp_list[$fp_id][meta])."')\n";
$fmp_list_show .= "\n add_fpRow('-1','{$fp_id}'";
$list_arr = array('title', 'creator', 'location', 'info', 'image', 'album', 'meta');
foreach ($list_arr as $value) {
if (!empty($fmp_list[$fp_id][$value])) {
$fmp_list_show .= ",'" . htmlspecialchars($fmp_list[$fp_id][$value], ENT_QUOTES) . "'";
} else {
$fmp_list_show .= ",''";
示例14: completeOpenID
function completeOpenID()
{
global $db_defaultsessdir, $db_tmpdir, $config, $lnc;
define('OpenIDFileStorePath', $db_tmpdir . '/openid');
require_once 'openid.php';
if ($db_defaultsessdir != 1) {
session_save_path("./{$db_tmpdir}");
}
session_start();
// Complete the authentication process using the server's response.
$response = $consumer->complete($_GET);
if ($response->status == Auth_OpenID_CANCEL) {
// This means the authentication was cancelled.
catcherror($lnc[316], false);
} else {
if ($response->status == Auth_OpenID_FAILURE) {
$msg = "OpenID authentication failed: " . $response->message;
catcherror($lnc[315] . $msg, false);
} else {
if ($response->status == Auth_OpenID_SUCCESS) {
// This means the authentication succeeded.
$openid = $response->identity_url;
$sreg = $response->extensionResponse('sreg');
//Format openid
$openid = str_replace(array('http://', 'https://'), array('', ''), $openid);
if (substr($openid, -1, 1) == '/') {
$openid = substr($openid, 0, strlen($openid) - 1);
}
return array('openidurl' => $openid, 'sreg' => $sreg);
} else {
catcherror($lnc[315] . 'OpenID Unknown Error.', false);
}
}
}
}
示例15: save_a_text
function save_a_text($entry)
{
global $mbcon, $adminlist, $blogversion, $config, $lnc, $permission, $userdetail, $logstat;
if ($entry['property'] >= 2 && $permission['SeeHiddenEntry'] != 1) {
catcherror($lnc[272]);
}
if ($entry['blogpsw'] && $permission['SeeAllProtectedEntry'] != 1 && $userdetail['userid'] != $entry['authorid']) {
catcherror($lnc[272]);
}
$entrytitle = $entry['title'];
$entrytime = gmdate('r', $entry['pubtime'] + 3600 * $config['timezone']);
//Need Further Change
$tmp = $entry['authorid'];
$entryauthor = $adminlist[$tmp];
$entry['content'] = @str_replace('[separator]', '', $entry['content']);
$entry['content'] = @str_replace('[newpage]', '', $entry['content']);
if ($logstat != 1) {
$entry['content'] = preg_replace("/\\[hide\\](.+?)\\[\\/hide\\]/is", "<br/>{$lnc[312]} {$lnc[79]} {$lnc[235]} {$lnc[89]}<br/>", $entry['content']);
} else {
$entry['content'] = str_replace(array('[hide]', '[/hide]'), '', $entry['content']);
}
$entrycontent = $this->getrsscontent($entry['content'], 0, $entry['ubbstat'], 0);
$entrycontent = str_replace(array('<br/>', '</p>', '</div>', '{', '}', ' '), array("\r\n", "\r\n", "\r\n", '{', '}', ' '), $entrycontent);
$entrycontent = strip_tags($entrycontent);
$entrycontent = html_entity_decode($entrycontent, ENT_QUOTES);
$entryurl = "{$config['blogurl']}/" . getlink_entry($entry['blogid'], $entry['blogalias']);
@header('Content-type: text/plain');
@header('Content-Disposition: attachment; filename="' . date('Ymd-His') . '.txt"');
$UTF8BOM = chr(239) . chr(187) . chr(191);
echo "{$UTF8BOM}{$lnc[71]}{$entrytitle}\r\n{$lnc[72]}{$config['blogname']}\r\n{$lnc[73]}{$entrytime}\r\n{$lnc[74]}{$entryauthor}\r\n{$lnc[75]}{$entryurl}\r\n\r\n{$lnc[76]}\r\n{$entrycontent}\r\n\r\n\r\nGenerated by Bo-blog {$blogversion}";
exit;
}