本文整理汇总了PHP中e107::getLog方法的典型用法代码示例。如果您正苦于以下问题:PHP e107::getLog方法的具体用法?PHP e107::getLog怎么用?PHP e107::getLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类e107
的用法示例。
在下文中一共展示了e107::getLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: e_linkwords
function e_linkwords()
{
global $pref, $admin_log;
/* constructor */
// Do an auto-update on the variable used to hook parsers - so we should only be called once
e107::lan('linkwords', e_LANGUAGE);
// e_PLUGIN."linkwords/languages/".e_LANGUAGE.".php"
$hooks = explode(",", $pref['tohtml_hook']);
if (($key = array_search('linkwords', $hooks)) !== FALSE) {
unset($hooks[$key]);
}
if (count($hooks) == 0) {
unset($pref['tohtml_hook']);
} else {
$pref['tohtml_hook'] = implode(',', $hooks);
}
if (!isset($pref['e_tohtml_list'])) {
$pref['e_tohtml_list'] = array();
}
if (!in_array('linkwords', $pref['e_tohtml_list'])) {
$pref['e_tohtml_list'][] = 'linkwords';
}
save_prefs();
e107::getLog()->add('LINKWD_05', LWLAN_58 . '[!br!]' . $pref['tohtml_hook'], '');
// Log that the update was done
return;
}
示例2: pingit
function pingit($vals)
{
global $admin_log;
require e_PLUGIN . "gsitemap/weblog_pinger.php";
$pinger = new Weblog_Pinger();
// $pinger->ping_ping_o_matic("Ekzemplo", "http://www.ekzemplo.com/");
$xml_rpc_server = "blogsearch.google.com";
$xml_rpc_port = 80;
$xml_rpc_path = "/ping/RPC2";
$xml_rpc_method = "weblogUpdates.extendedPing";
$weblog_name = SITENAME;
$weblog_url = $_SERVER['HTTP_HOST'] . e_HTTP;
$changes_url = $_SERVER['HTTP_HOST'] . e_HTTP . "news.php?extend." . $vals['news_id'];
$cat_or_rss = $_SERVER['HTTP_HOST'] . e_PLUGIN_ABS . "rss_menu/rss.php?1.2";
$extended = TRUE;
$pinger->ping($xml_rpc_server, $xml_rpc_port, $xml_rpc_path, $xml_rpc_method, $weblog_name, $weblog_url, $changes_url, $cat_or_rss, $extended);
$log = strip_tags($vals['news_title'] . "\n" . $changes_url . "\n" . $cat_or_rss . "\n" . $pinger->smessage);
e107::getLog()->add("Gsitemap Google-ping", $log, 4);
}
示例3: array
$admin_log->logArrayAll('NEWSFD_02', $feed);
$mes->addSuccess(LAN_UPDATED);
} else {
$mes->addInfo(LAN_NO_CHANGE . ': ' . $sql->mySQLerror);
}
}
e107::getCache()->clear(NEWSFEED_LIST_CACHE_TAG);
// This should actually clear all the newsfeed data in one go
} else {
$mes->addError(LAN_REQUIRED_BLANK);
}
}
$ns->tablerender($caption, $mes->render() . $text);
if ($action == "delete") {
$sql->db_Delete('newsfeed', 'newsfeed_id=' . $id);
e107::getLog()->add('NEWSFD_03', 'ID: ' . $id, E_LOG_INFORMATIVE, '');
$mes->addSuccess(LAN_DELETED);
}
$ns->tablerender($caption, $mes->render() . $text);
if ($headline_total = $sql->db_Select("newsfeed")) {
$nfArray = $sql->rows();
$text = "\n\t<table class='table table-striped'>\n\t<colgroup>\n\t\t<col style='width: 5%; text-align: center;' />\n\t\t<col style='width: 40%;' />\n\t\t<col style='width: 10%; text-align: center;' />\n\t\t<col style='width: 25%; text-align: center;' />\n\t\t<col style='width: 10%; text-align: center;' />\n\t</colgroup>\n\t<thead>\n\t<tr>\n\t\t<th>" . LAN_ID . "</th>\n\t\t<th>" . LAN_NAME . "</th>\n\t\t<th>" . NFLAN_26 . "</th>\n\t\t<th>" . NFLAN_12 . "</th>\n\t\t<th class='center options'>" . LAN_OPTIONS . "</th>\n\t</tr>\n\t</thead>\n";
$active = array(NFLAN_13, NFLAN_14, NFLAN_20, NFLAN_21);
foreach ($nfArray as $newsfeed) {
extract($newsfeed);
// FIXME
$text .= "\n\t\t<tr>\n\t\t\t<td>{$newsfeed_id}</td>\n\t\t\t<td><a href='{$newsfeed_url}' rel='external'>{$newsfeed_name}</a></td>\n\t\t\t<td>" . ($newsfeed_updateint ? $newsfeed_updateint : "3600") . "</td>\n\t\t\t<td>" . $active[$newsfeed_active] . "</td>\n\t\t\t<td>\n\t\t\t\t<a class='btn btn-default btn-large' href='" . e_SELF . "?edit." . $newsfeed_id . "'>" . ADMIN_EDIT_ICON . "</a>\n\t <a class='btn btn-default btn-large action delete' href='" . e_SELF . "?delete." . $newsfeed_id . "' rel='no-confirm' title='" . LAN_CONFDELETE . "'>" . ADMIN_DELETE_ICON . "</a>\n\t\t\t</td>\n\t\t</tr>";
}
$text .= "</table>";
} else {
$mes->addInfo(NFLAN_41);
示例4: foreach
foreach ($uploaded as $k => $inf) {
if ($inf['error'] == 0) {
$uploadList[] = $_POST['upload_dir'][$key] . $uploaded[0]['name'];
} else {
// Most likely errors trapped earlier.
//$message .= $spacer.FMLAN_10.' '.$inf['error'].' ('.$inf['message'].'): '.$inf['rawname']; // FIXME
$mes->addError($inf['error'] . ' (' . $inf['message'] . '): ' . $inf['rawname']);
}
$spacer = '<br />';
}
}
}
}
}
if (count($uploadList)) {
e107::getLog()->add('FILEMAN_03', implode('[!br!]', $uploadList), E_LOG_INFORMATIVE, '');
}
}
$ns->tablerender($caption, $mes->render() . $text);
/*
if ($message)
{
$ns->tablerender("", "<div style=\"text-align:center\"><b>".$message."</b></div>");
}
*/
if (strpos(e_QUERY, ".") && !is_dir(realpath(e_BASE . $path))) {
echo "\n\t<div>\n\t\t<iframe style='width:99%' src='" . e_BASE . e_QUERY . "' height='300' scrolling='yes'>asdas</iframe>\n\t</div>\n\t";
if (!strpos(e_QUERY, "/")) {
$path = "";
} else {
$path = substr($path, 0, strrpos(substr($path, 0, -1), "/")) . "/";
示例5: resizeImage
/**
* Resize an image.
* @param $src
* @param $dest
* @param string $opts
* @return bool
*/
function resizeImage($src = '', $dest = '', $opts = null)
{
$pref = e107::getPref();
$tp = e107::getParser();
if (empty($src)) {
return false;
}
if (is_string($opts)) {
parse_str($opts, $opts);
}
$quality = vartrue($pref['thumbnail_quality'], 65);
$src = $tp->replaceConstants($src);
$dest = $tp->replaceConstants($dest);
$maxWidth = varset($opts['w'], 800);
$maxHeight = varset($opts['h'], 800);
$destDir = dirname($dest);
$destFile = basename($dest);
$destFilePath = $destDir . "/" . varset($opts['prefix'], $maxWidth . 'x' . $maxHeight) . '_' . $destFile;
if (file_exists($destFilePath)) {
return $destFilePath;
}
@(require e_HANDLER . 'phpthumb/ThumbLib.inc.php');
try {
$thumb = PhpThumbFactory::create($src);
$thumb->setOptions(array('correctPermissions' => true, 'resizeUp' => false, 'jpegQuality' => $quality));
$thumb->resize($maxWidth, $maxHeight);
$thumb->save($destFilePath);
return $destFilePath;
} catch (Exception $e) {
$error = array('thumbnailer' => $e->getMessage(), 'src' => $src, 'dest' => $dest, 'savePath' => $destFilePath, 'backtrace' => 'e_media::resizeImage');
e107::getMessage()->addDebug(print_a($error, true));
e107::getLog()->add("RESIZE ERROR", $error, E_LOG_INFORMATIVE, 'RESIZE');
return false;
}
}
示例6:
// can be removed?
$mes->addSuccess($_POST['language'] . ' ' . $value . ' ' . LAN_DELETED);
} else {
$msg = $tp->lanVars(LANG_LAN_02, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
} else {
// leave table. LANG_LAN_104
$msg = $tp->lanVars(LANG_LAN_104, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addInfo($msg);
}
}
}
e107::getLog()->add('LANG_03', $message, E_LOG_INFORMATIVE, '');
$sql->db_ResetTableList();
}
/*
if(isset($message) && $message)
{
$ns->tablerender(LAN_OK, $message);
}
*/
unset($text);
if (!e_QUERY || $action == 'main' && !$_POST['language'] && !$_POST['edit_existing']) {
multilang_prefs();
}
if (varset($action) == 'db') {
multilang_db();
}
示例7: update_70x_to_706
function update_70x_to_706($type = '')
{
global $sql, $ns, $pref, $e107info, $admin_log, $emessage;
$just_check = $type == 'do' ? FALSE : TRUE;
if (!$sql->db_Field("plugin", 5)) {
if ($just_check) {
return update_needed();
}
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "plugin` ADD `plugin_addons` TEXT NOT NULL ;");
catch_error($sql);
}
//rename plugin_rss field
if ($sql->db_Field("plugin", 5) == "plugin_rss") {
if ($just_check) {
return update_needed();
}
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "plugin` CHANGE `plugin_rss` `plugin_addons` TEXT NOT NULL;");
catch_error($sql);
}
if ($sql->db_Field("dblog", 5) == "dblog_query") {
if ($just_check) {
return update_needed();
}
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "dblog` CHANGE `dblog_query` `dblog_title` VARCHAR( 255 ) NOT NULL DEFAULT '';");
catch_error($sql);
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "dblog` CHANGE `dblog_remarks` `dblog_remarks` TEXT NOT NULL;");
catch_error($sql);
}
if (!$sql->db_Field("plugin", "plugin_path", "UNIQUE")) {
if ($just_check) {
return update_needed();
}
if (!$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "plugin` ADD UNIQUE (`plugin_path`);")) {
$mesg = LAN_UPDATE_12 . " : <a href='" . e_ADMIN . "db.php?plugin'>" . ADLAN_145 . "</a>.";
//$ns -> tablerender(LAN_ERROR,$mes);
$emessage->add($mesg, E_MESSAGE_ERROR);
catch_error($sql);
}
}
if (!$sql->db_Field("online", 6)) {
if ($just_check) {
return update_needed();
}
$sql->db_Select_gen("ALTER TABLE " . MPREFIX . "online ADD online_active INT(10) UNSIGNED NOT NULL DEFAULT '0'");
catch_error($sql);
}
if ($sql->db_Query("SHOW INDEX FROM " . MPREFIX . "tmp")) {
$row = $sql->db_Fetch();
if (!in_array('tmp_ip', $row)) {
if ($just_check) {
return update_needed();
}
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "tmp` ADD INDEX `tmp_ip` (`tmp_ip`);");
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "upload` ADD INDEX `upload_active` (`upload_active`);");
$sql->db_Select_gen("ALTER TABLE `" . MPREFIX . "generic` ADD INDEX `gen_type` (`gen_type`);");
}
}
if (!$just_check) {
// update new fields
require_once e_HANDLER . "plugin_class.php";
$ep = new e107plugin();
$ep->update_plugins_table('update');
$ep->save_addon_prefs('update');
}
if (!isset($pref['displayname_maxlength'])) {
if ($just_check) {
return update_needed();
}
$pref['displayname_maxlength'] = 15;
save_prefs();
}
// If we get to here, in checking mode no updates are required. In update mode, all done.
if ($just_check) {
return TRUE;
}
e107::getLog()->add('UPDATE_02', LAN_UPDATE_14 . $e107info['e107_version'], E_LOG_INFORMATIVE, '');
// Log result of actual update
return $just_check;
// TRUE if no updates needed, FALSE if updates needed and completed
}
示例8: field_deactivate
function field_deactivate()
{
global $ue, $ns, $tp, $sql, $admin_log;
$ret = "";
foreach (array_keys($_POST['deactivate']) as $f) {
if ($ue->user_extended_remove($f, $f)) {
$ret .= EXTLAN_68 . " {$f} " . EXTLAN_72 . "<br />";
if (is_readable(e_CORE . "sql/extended_" . $f . ".php")) {
$ret .= mysql_query("DROP TABLE " . MPREFIX . "user_extended_" . $f) ? LAN_DELETED . " user_extended_" . $f . "<br />" : LAN_DELETED_FAILED . " user_extended_" . $f . "<br />";
}
} else {
$ret .= EXTLAN_70 . " {$f} " . EXTLAN_73 . "<br />";
}
}
e107::getLog()->add('EUF_12', implode(', ', $_POST['deactivate']), E_LOG_INFORMATIVE, '');
return $ret;
}
示例9: avatarPageDeleteChecked
function avatarPageDeleteChecked()
{
$sql = e107::getDb();
$mes = e107::getMessage();
if (!empty($_POST['multiaction'])) {
$tmp = array();
$tmp1 = array();
$message = array();
foreach ($_POST['multiaction'] as $todel) {
list($usr, $path) = explode('#', $todel);
// $path = basename($path);
$path = str_replace("../", "", $path);
// clean the path.
$mes->addDebug('usr: ' . intval($usr) . ' path: ' . $path);
$image_type = 2;
if (strpos($path, '-upload-') === 0) {
$image_type = 1;
$path = substr($path, strlen('-upload-'));
}
//delete it from server
$deletePath = e_AVATAR . $path;
if (@unlink($deletePath)) {
$mes->addDebug('Deleted: ' . $deletePath);
$message[] = basename($path);
//admin log & sysmessage
} else {
$mes->addError('Unable to delete: ' . $deletePath);
// Do not translate, temporary during beta stage.
}
//It's owned by an user
if (!empty($usr)) {
switch ($image_type) {
case 1:
//avatar
$tmp[] = intval($usr);
break;
case 2:
//photo
$tmp1[] = intval($usr);
break;
}
}
}
//Reset all deleted user avatars with one query
if (!empty($tmp)) {
$sql->update("user", "user_image='' WHERE user_id IN (" . implode(',', $tmp) . ")");
$mes->addDebug("user_image='' WHERE user_id IN (" . implode(',', $tmp) . ")");
}
//Reset all deleted user photos with one query
if (!empty($tmp1)) {
$sql->update("user", "user_sess='' WHERE user_id IN (" . implode(',', $tmp1) . ")");
$mes->addDebug("user_sess='' WHERE user_id IN (" . implode(',', $tmp1) . ")");
}
unset($tmp, $tmp1);
//Format system message
if (!empty($message)) {
e107::getLog()->add('IMALAN_01', implode('[!br!]', $message), E_LOG_INFORMATIVE, '');
$mes->addSuccess(implode(', ', $message) . ' ' . IMALAN_28);
}
}
}
示例10: dbPageEditProcess
private function dbPageEditProcess()
{
$tabs = $this->getTables();
$sql = e107::getDb();
$tp = e107::getParser();
$mes = e107::getMessage();
$message = '';
// ----------------- delete tables ---------------------------------------------
if (isset($_POST['del_existing']) && $_POST['lang_choices'] && getperms('0')) {
$lang = strtolower($_POST['lang_choices']);
foreach ($tabs as $del_table) {
if ($sql->isTable($del_table, $lang)) {
// echo $del_table." exists<br />";
$qry = "DROP TABLE " . MPREFIX . "lan_" . $lang . "_" . $del_table;
if (mysql_query($qry)) {
$msg = $tp->lanVars(LANG_LAN_100, $_POST['lang_choices'] . ' ' . $del_table);
$message .= $msg . '[!br!]';
$mes->addSuccess($msg);
} else {
$msg = $tp->lanVars(LANG_LAN_101, $_POST['lang_choices'] . ' ' . $del_table);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
}
}
e107::getLog()->add('LANG_02', $message . '[!br!]', E_LOG_INFORMATIVE, '');
$sql->db_ResetTableList();
}
// ----------create tables -----------------------------------------------------
if (isset($_POST['create_tables']) && $_POST['language']) {
$table_to_copy = array();
$lang_to_create = array();
foreach ($tabs as $value) {
$lang = strtolower($_POST['language']);
if (isset($_POST[$value])) {
$copdata = $_POST['copydata_' . $value] ? 1 : 0;
if ($sql->db_CopyTable($value, "lan_" . $lang . "_" . $value, $_POST['drop'], $copdata)) {
$msg = $tp->lanVars(LANG_LAN_103, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
// Used in admin log.
$mes->addSuccess($msg);
} else {
if (!$_POST['drop']) {
$msg = $tp->lanVars(LANG_LAN_00, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
} else {
$msg = $tp->lanVars(LANG_LAN_01, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
}
} elseif ($sql->isTable($value, $_POST['language'])) {
if ($_POST['remove']) {
// Remove table.
if (mysql_query("DROP TABLE " . MPREFIX . "lan_" . $lang . "_" . $value)) {
$message .= $_POST['language'] . ' ' . $value . ' ' . LAN_DELETED . '[!br!]';
// can be removed?
$mes->addSuccess($_POST['language'] . ' ' . $value . ' ' . LAN_DELETED);
} else {
$msg = $tp->lanVars(LANG_LAN_02, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addWarning($msg);
}
} else {
// leave table. LANG_LAN_104
$msg = $tp->lanVars(LANG_LAN_104, $_POST['language'] . ' ' . $value);
$message .= $msg . '[!br!]';
$mes->addInfo($msg);
}
}
}
e107::getLog()->add('LANG_03', $message, E_LOG_INFORMATIVE, '');
$sql->db_ResetTableList();
}
}
示例11: closedir
closedir($handle);
if (isset($_POST['update_theme'])) {
$tmp = array();
foreach ($_POST as $key => $value) {
if (substr($key, 0, 6) == 'theme_') {
$tmp[] = $value;
}
}
$newThemes = implode(',', $tmp);
$themeeditclass = intval($_POST['themeeditclass']);
if ($newThemes != $pref['allowed_themes'] || $themeeditclass != $pref['allow_theme_select']) {
$pref['allowed_themes'] = $newThemes;
$pref['allow_theme_select'] = $themeeditclass;
save_prefs();
$woffle = LAN_UMENU_THEME_8 . $pref['allowed_themes'] . '[!br!]' . LAN_UMENU_THEME_9 . $pref['allow_theme_select'];
e107::getLog()->add('UTHEME_01', $woffle, E_LOG_INFORMATIVE, '');
}
}
if (isset($pref['allowed_themes'])) {
$allThemes = FALSE;
$themeList = explode(',', $pref['allowed_themes']);
}
$themeeditclass = varset($pref['allow_theme_select'], e_UC_NOBODY);
$text = "\n\t<form method='post' action='" . e_SELF . "' id='menu_conf_form'>\n\t<fieldset id='core-user_menu-usertheme'>\n\t<legend class='e-hideme'>" . LAN_UMENU_THEME_6 . "</legend>\n\t<table class='table adminlist'>\n\t\t<colgroup span='2'>\n\t\t<col style='width: 50%' />\n\t\t<col style='width: 50%' />\n\t</colgroup>\n <thead>\n\t<tr>\n\t\t<th colspan='2'>" . LAN_UMENU_THEME_4 . "</th>\n\t</tr>\n\t</thead>\n\t\t<tbody>";
foreach ($themeOptions as $th) {
$ch = in_array($th, $themeList) ? " checked='checked'" : '';
$text .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{$th}</td>\n\t\t\t\t\t<td><input class='tbox' type='checkbox' name='theme_{$th}' value='{$th}' {$ch} /></td>\n\t\t\t\t</tr>";
}
$text .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . LAN_UMENU_THEME_7 . "</td>\n\t\t\t\t\t<td>" . $e_userclass->uc_dropdown("themeeditclass", $themeeditclass, "main,member,admin,classes,matchclass,nobody") . "</td>\n\t\t\t\t</tr>";
$text .= "\n \t</tbody>\n\t</table>\n\t<div class='buttons-bar center'>\n\t\t" . $frm->admin_button('update_theme', LAN_UPDATE, 'update') . "\n\t</div>\n\t</fieldset>\n\t</form>\n\t";
$mes = e107::getMessage();
示例12: processActivationLink
private function processActivationLink()
{
global $userMethods;
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
$log = e107::getLog();
$pref = e107::pref('core');
$qs = explode('.', e_QUERY);
if ($qs[0] == 'activate' && (count($qs) == 3 || count($qs) == 4) && $qs[2]) {
// FIXME TODO use generic multilanguage selection => e107::coreLan();
// return the message in the correct language.
if (isset($qs[3]) && strlen($qs[3]) == 2) {
require_once e_HANDLER . 'language_class.php';
$slng = new language();
$the_language = $slng->convert($qs[3]);
if (is_readable(e_LANGUAGEDIR . $the_language . '/lan_' . e_PAGE)) {
include e_LANGUAGEDIR . $the_language . '/lan_' . e_PAGE;
} else {
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/lan_' . e_PAGE);
}
} else {
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/lan_' . e_PAGE);
}
e107::getCache()->clear("online_menu_totals");
if ($sql->select("user", "*", "user_sess='" . $tp->toDB($qs[2], true) . "' ")) {
if ($row = $sql->fetch()) {
$dbData = array();
$dbData['WHERE'] = " user_sess='" . $tp->toDB($qs[2], true) . "' ";
$dbData['data'] = array('user_ban' => '0', 'user_sess' => '');
// Set initial classes, and any which the user can opt to join
if ($init_class = $userMethods->userClassUpdate($row, 'userfull')) {
//print_a($init_class); exit;
$dbData['data']['user_class'] = $init_class;
}
$userMethods->addNonDefaulted($dbData);
validatorClass::addFieldTypes($userMethods->userVettingInfo, $dbData);
$newID = $sql->update('user', $dbData);
if ($newID === false) {
$log->e_log_event(10, debug_backtrace(), 'USER', 'Verification Fail', print_r($row, true), false, LOG_TO_ROLLING);
$ns->tablerender(LAN_SIGNUP_75, LAN_SIGNUP_101);
return false;
}
// Log to user audit log if enabled
$log->user_audit(USER_AUDIT_EMAILACK, $row);
e107::getEvent()->trigger('userveri', $row);
// Legacy event
e107::getEvent()->trigger('user_signup_activated', $row);
e107::getEvent()->trigger('userfull', $row);
// 'New' event
if (varset($pref['autologinpostsignup'])) {
require_once e_HANDLER . 'login.php';
$usr = new userlogin();
$usr->login($row['user_loginname'], md5($row['user_name'] . $row['user_password'] . $row['user_join']), 'signup', '');
}
$text = "<div class='alert alert-success'>" . LAN_SIGNUP_74 . " <a href='index.php'>" . LAN_SIGNUP_22 . "</a> " . LAN_SIGNUP_23 . "<br />" . LAN_SIGNUP_24 . " " . SITENAME . "</div>";
$ns->tablerender(LAN_SIGNUP_75, $text);
}
} else {
// Invalid activation code
$log->e_log_event(10, debug_backtrace(), 'USER', 'Invalid Verification URL', print_r($qs, true), false, LOG_TO_ROLLING);
echo e107::getMessage()->addError("Invalid URL")->render();
// header("location: ".e_BASE."index.php");
return false;
}
}
}
示例13: header
header("location:" . e_BASE . "index.php");
exit;
}
require_once e_ADMIN . "auth.php";
if (isset($_POST['moderate'])) {
$temp = array();
if (is_array($_POST['trackback_delete'])) {
while (list($key, $cid) = each($_POST['trackback_delete'])) {
$cid = intval($cid);
if ($cid > 0) {
$sql->db_Delete("trackback", "trackback_id=" . $cid);
$temp[] = $cid;
}
}
if (count($temp)) {
e107::getLog()->add('TRACK_02', implode(', ', $temp), E_LOG_INFORMATIVE, '');
}
}
$ns->tablerender("", "<div style='text-align:center'><b>" . TRACKBACK_L15 . "</b></div>");
$e107cache->clear("news.php");
}
$text = "<div style='text-align:center'>\n<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n<table style='" . ADMIN_WIDTH . "' class='fborder'>";
if (e_QUERY == 'all') {
$res = $sql->db_Select("trackback", "*");
} else {
$res = $sql->db_Select("trackback", "*", "trackback_pid=" . intval(e_QUERY));
}
if (!$res) {
$text .= "<tr><td class='forumheader3' style='text-align:center'>" . TRACKBACK_L12 . ".</td></tr></table></form></div>";
} else {
$tbArray = $sql->db_getList();
示例14: rempagego
function rempagego()
{
global $sql, $admin_log;
$sql->db_Select("logstats", "*", "log_id='pageTotal' ");
$row = $sql->db_Fetch();
$pageTotal = unserialize($row['log_data']);
$logfile = e_LOG . "logp_" . date("z.Y", time()) . ".php";
// $logfile = e_PLUGIN."log/logs/logp_".date("z.Y", time()).".php";
if (is_readable($logfile)) {
require $logfile;
}
foreach ($_POST['remcb'] as $page) {
unset($pageInfo[$page]);
unset($pageTotal[$page]);
}
$pagetotal = serialize($pageTotal);
if (!$sql->db_Update("logstats", "log_data='{$pagetotal}' WHERE log_id='pageTotal' ")) {
$sql->db_Insert("logstats", "0, 'pageTotal', '{$pagetotal}' ");
}
e107::getLog()->add('STAT_03', ADSTAT_L80 . "[!br!]" . implode("[!br!]", $_POST['remcb']), '');
$varStart = chr(36);
$quote = chr(34);
$data = chr(60) . "?php\n" . chr(47) . "* e107 website system: Log file: " . date("z:Y", time()) . " *" . chr(47) . "\n\n" . $varStart . "ipAddresses = " . $quote . $ipAddresses . $quote . ";\n" . $varStart . "siteTotal = " . $quote . $siteTotal . $quote . ";\n" . $varStart . "siteUnique = " . $quote . $siteUnique . $quote . ";\n";
$loop = FALSE;
$data .= $varStart . "pageInfo = array(\n";
foreach ($pageInfo as $info) {
$page = preg_replace("/(\\?.*)|(\\_.*)|(\\.php)|(\\s)|(\\')|(\")|(eself)|( )/", "", basename($info['url']));
$page = str_replace("\\", "", $page);
$info['url'] = preg_replace("/(\\s)|(\\')|(\")|(eself)|( )/", "", $info['url']);
$info['url'] = str_replace("\\", "", $info['url']);
$page = trim($page);
if ($page && !strstr($page, "cache") && !strstr($page, "file:")) {
if ($loop) {
$data .= ",\n";
}
$data .= $quote . $page . $quote . " => array('url' => '" . $info['url'] . "', 'ttl' => " . $info['ttl'] . ", 'unq' => " . $info['unq'] . ")";
$loop = 1;
}
}
$data .= "\n);\n\n?" . chr(62);
if ($handle = fopen($logfile, 'w')) {
fwrite($handle, $data);
}
fclose($handle);
}
示例15: array
$userData['data'] = array();
if ($_POST['a_password'] != '' && $_POST['a_password2'] != '' && $_POST['a_password'] == $_POST['a_password2']) {
$userData['data']['user_password'] = $sql->escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE);
unset($_POST['a_password']);
unset($_POST['a_password2']);
if (vartrue($pref['allowEmailLogin'])) {
$user_prefs = e107::getArrayStorage()->unserialize($currentUser['user_prefs']);
$user_prefs['email_password'] = $userMethods->HashPassword($new_pass, $email);
$userData['data']['user_prefs'] = e107::getArrayStorage()->serialize($user_prefs);
}
$userData['data']['user_pwchange'] = time();
$userData['WHERE'] = 'user_id=' . USERID;
validatorClass::addFieldTypes($userMethods->userVettingInfo, $userData, $userMethods->otherFieldTypes);
$check = $sql->update('user', $userData);
if ($check) {
e107::getLog()->add('ADMINPW_01', '', E_LOG_INFORMATIVE, '');
$userMethods->makeUserCookie(array('user_id' => USERID, 'user_password' => $userData['data']['user_password']), FALSE);
// Can't handle autologin ATM
$mes->addSuccess(UDALAN_3 . " " . ADMINNAME);
e107::getEvent()->trigger('adpword');
//@deprecated
$eventData = array('user_id' => USERID, 'user_pwchange' => $userData['data']['user_pwchange']);
e107::getEvent()->trigger('admin_password_update', $eventData);
$ns->tablerender(UDALAN_2, $mes->render());
} else {
$mes->addError(UDALAN_1 . ' ' . LAN_UPDATED_FAILED);
$ns->tablerender(LAN_UPDATED_FAILED, $mes->render());
}
} else {
$mes->addError(UDALAN_1 . ' ' . LAN_UPDATED_FAILED);
$ns->tablerender(LAN_UPDATED_FAILED, $mes->render());