mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
Issue #4283 - Update deprecated sql method usage. Removed old code.
This commit is contained in:
parent
8c0e2c0392
commit
42f0e902d4
e107_admin
administrator.phpauth.phpbanlist.phpcomment.phpimage.phpmessage.phpupdate_routines.phpupload.phpusers.php
e107_core
e107_handlers
admin_log_class.phpavatar_handler.phpiphandler_class.phpjs_helper.phprate_class.phpren_help.php
search
sitelinks_class.phpe107_plugins
alt_auth
blogcalendar_menu
chatbox_menu
download
forum
import/providers
linkwords
log
news
newsletter
page
pm
poll
rss_menu
@ -119,7 +119,7 @@ function show_admins()
|
||||
|
||||
|
||||
|
||||
$sql->db_Select("user", "*", "user_admin='1'");
|
||||
$sql->select("user", "*", "user_admin='1'");
|
||||
|
||||
$text = "
|
||||
<form action='".e_SELF."' method='post' id='del_administrator'>
|
||||
|
@ -166,8 +166,7 @@ else
|
||||
|
||||
$cookieval = $row['user_id'].".".md5($row['user_password']);
|
||||
|
||||
// $sql->db_Select("user", "*", "user_name='".$tp -> toDB($_POST['authname'])."'");
|
||||
// list($user_id, $user_name, $userpass) = $sql->db_Fetch();
|
||||
|
||||
|
||||
// Calculate class membership - needed for a couple of things
|
||||
// Problem is that USERCLASS_LIST just contains 'guest' and 'everyone' at this point
|
||||
|
@ -1137,7 +1137,7 @@ if ($writeBanFile)
|
||||
// Edit modes - get existing entry
|
||||
if ($action == 'edit' || $action == 'whedit')
|
||||
{
|
||||
$sql->db_Select('banlist', '*', "banlist_ip='{$sub_action}'");
|
||||
$sql->select('banlist', '*', "banlist_ip='{$sub_action}'");
|
||||
$row = $sql->fetch();
|
||||
extract($row); //FIXME - kill extract()
|
||||
}
|
||||
@ -1695,7 +1695,7 @@ switch ($action)
|
||||
$filter = ($action == 'white') ? 'banlist_bantype='.eIPHandler::BAN_TYPE_WHITELIST : 'banlist_bantype!='.eIPHandler::BAN_TYPE_WHITELIST;
|
||||
|
||||
|
||||
if(!$ban_total = $sql->db_Select("banlist", "*", $filter." ORDER BY banlist_ip"))
|
||||
if(!$ban_total = $sql->select("banlist", "*", $filter." ORDER BY banlist_ip"))
|
||||
{
|
||||
//$text .= "<div class='center'>".$no_values[$action]."</div>";
|
||||
$mes->addInfo($no_values[$action]);
|
||||
|
@ -348,55 +348,3 @@ e107::getAdminUI()->runPage();
|
||||
require_once(e_ADMIN."footer.php");
|
||||
exit;
|
||||
|
||||
/*
|
||||
if (e_QUERY)
|
||||
{
|
||||
$temp = explode("-", e_QUERY);
|
||||
$action = $temp[0];
|
||||
$id = intval($temp[1]);
|
||||
$item = $temp[2];
|
||||
$c_item = $temp[3];
|
||||
if ($sql->select('comments','*', 'comment_id='.$id))
|
||||
{
|
||||
$comment = $sql->db_Fetch();
|
||||
if ($action == "block")
|
||||
{
|
||||
$sql->db_Update("comments", "comment_blocked='1' WHERE comment_id=".$id);
|
||||
}
|
||||
if ($action == "unblock")
|
||||
{
|
||||
$sql->db_Update("comments", "comment_blocked='0' WHERE comment_id=".$id);
|
||||
}
|
||||
if ($action == "delete")
|
||||
{
|
||||
$sql->db_Delete("comments", "comment_id=".$id);
|
||||
switch ($comment['comment_type'])
|
||||
{
|
||||
case '0' :
|
||||
case 'news' : // Need to update count in news record as well
|
||||
$sql2->db_Update('news', 'news_comment_total = CAST(GREATEST(CAST(news_comment_total AS SIGNED) - 1, 0) AS UNSIGNED) WHERE news_id='.$comment['comment_item_id']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$e107cache->clear($item))
|
||||
{
|
||||
$tmp = explode("?", $item);
|
||||
$item = $tmp[0]."?news.".$c_item;
|
||||
$e107cache->clear($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// $cm= new comment_manager;
|
||||
// $cm->commentList();
|
||||
}
|
||||
// echo "<script type='text/javascript'>window.history.go(-1);</script>\n";
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
@ -359,7 +359,7 @@ class media_form_ui extends e_admin_form_ui
|
||||
/*$sql = e107::getDb();
|
||||
// $sql->gen("SELECT media_cat_title, media_title_nick FROM #core_media as m LEFT JOIN #core_media_cat as c ON m.media_category = c.media_cat_owner GROUP BY m.media_category");
|
||||
$sql->gen("SELECT media_cat_title, media_cat_owner FROM #core_media_cat");
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$cat = $row['media_cat_owner'];
|
||||
$this->cats[$cat] = $row['media_cat_title'];
|
||||
@ -2769,9 +2769,9 @@ class media_admin_ui extends e_admin_ui
|
||||
$image_pre = '';
|
||||
$disabled = false;
|
||||
/*
|
||||
if ($sql->db_Select("user", "*", "user_image='-upload-".$tp->toDB($image_name)."' OR user_sess='".$tp->toDB($image_name)."'"))
|
||||
if ($sql->select("user", "*", "user_image='-upload-".$tp->toDB($image_name)."' OR user_sess='".$tp->toDB($image_name)."'"))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
$row = $sql->fetch();
|
||||
if($row['user_image'] == '-upload-'.$image_name) $image_pre = '-upload-';
|
||||
$users .= "<a href='".$e107->url->create('user/profile/view', 'name='.$row['user_name'].'&id='.$row['user_id'])."'>{$row['user_name']}</a> <span class='smalltext'>(".($row['user_sess'] == $image_name ? IMALAN_24 : IMALAN_23).")</span>";
|
||||
}
|
||||
@ -3422,7 +3422,7 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
/*
|
||||
|
||||
if(file_exists($newpath) || $sql->db_Select("core_media","media_url = '".$tp->createConstants($newpath,'rel')."' LIMIT 1") )
|
||||
if(file_exists($newpath) || $sql->select("core_media","media_url = '".$tp->createConstants($newpath,'rel')."' LIMIT 1") )
|
||||
{
|
||||
$mes->addWarning($newpath." already exists and was renamed during import.");
|
||||
$file = $f['pathinfo']['filename']."_.".$f['pathinfo']['extension'];
|
||||
|
@ -25,88 +25,4 @@ e107::getMessage()->addWarning("This area is no longer in use and will be remove
|
||||
$ns->tablerender("Received Messages", $mes->render());
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$messageTypes = array("Broken Download", "Dev Team Message");
|
||||
$queryString = "";
|
||||
foreach($messageTypes as $types) {
|
||||
$queryString .= " gen_type='$types' OR";
|
||||
}
|
||||
$queryString = substr($queryString, 0, -3);
|
||||
|
||||
if(isset($_POST['delete_message']))
|
||||
{
|
||||
if(preg_match("/\s[0-9]+/si", $_POST['delete_message'], $match))
|
||||
{
|
||||
$id = $match[0];
|
||||
$sql->db_Delete("generic", "gen_id=$id");
|
||||
$message = MESSLAN_3;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_all']) && isset($_POST['deleteconfirm']))
|
||||
{
|
||||
$sql->db_Delete("generic", $queryString);
|
||||
$message = MESSLAN_6;
|
||||
}
|
||||
|
||||
|
||||
if (isset($message)) {
|
||||
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
|
||||
}
|
||||
|
||||
|
||||
if($amount = $sql -> db_Select("generic", "*", $queryString))
|
||||
{
|
||||
|
||||
|
||||
$text = "<table style='width: 98%;' class='fborder'>\n<form method='post' action='".e_SELF."'>\n";
|
||||
$messages = $sql -> db_getList();
|
||||
|
||||
foreach($messages as $message)
|
||||
{
|
||||
extract($message);
|
||||
|
||||
$sql -> db_Select("user", "user_name", "user_id=$gen_user_id");
|
||||
$user = $sql -> db_Fetch();
|
||||
$user = "<a href='".e_BASE."user.php?id.$gen_user_id'>".$user['user_name']."</a>";
|
||||
|
||||
switch($gen_type)
|
||||
{
|
||||
case "Broken Download":
|
||||
$link = "<a href='".e_BASE."download.php?view.$gen_intdata' rel='external' title='".MESSLAN_11."'>$gen_ip</a>";
|
||||
$link .= " [<a href='".e_ADMIN."download.php?create.edit.".$gen_intdata."'>".LAN_EDIT."</a>]";
|
||||
break;
|
||||
case "Dev Team Message":
|
||||
$link = "";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$text .= "<tr>
|
||||
<td style='width: 100%;' class='forumheader3'><b>".MESSLAN_8."</b>: $gen_type<br />
|
||||
<b>".MESSLAN_9."</b>: ".$gen->convert_date($gen_datestamp, 'long')."<br />
|
||||
<b>".MESSLAN_10."</b>: $user<br />
|
||||
<b>".MESSLAN_13."</b>: $link ".
|
||||
($gen_chardata ? "<br /><b>".MESSLAN_12."</b>: $gen_chardata" : "")."<br /><input class='btn btn-default btn-secondary button' type='submit' name='delete_message' value='".MESSLAN_2." $gen_id' />
|
||||
</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><br /><input class='btn btn-default btn-secondary button' type='submit' name='delete_all' value='".MESSLAN_4."' />
|
||||
<input type='checkbox' name='deleteconfirm' value='1' /> ".MESSLAN_5."
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</form></table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = MESSLAN_7;
|
||||
}
|
||||
$ns->tablerender(MESSLAN_1, $text);
|
||||
|
||||
*/
|
||||
require_once("footer.php");
|
@ -76,20 +76,7 @@ $dont_check_update = false;
|
||||
|
||||
if (!$dont_check_update)
|
||||
{
|
||||
/*
|
||||
if ($sql->db_Select('plugin', 'plugin_id, plugin_version, plugin_path', 'plugin_installflag=1'))
|
||||
{
|
||||
while ($row = $sql->db_Fetch())
|
||||
{ // Mark plugins for update which have a specific update file, or a plugin.php file to check
|
||||
if(is_readable(e_PLUGIN.$row['plugin_path'].'/'.$row['plugin_path'].'_update_check.php') || is_readable(e_PLUGIN.$row['plugin_path'].'/plugin.php') || is_readable(e_PLUGIN.$row['plugin_path'].'/'.$row['plugin_path'].'_setup.php'))
|
||||
{
|
||||
$dbupdateplugs[$row['plugin_path']] = $row['plugin_version'];
|
||||
//TODO - Add support for {plugins}_setup.php upgrade check and routine.
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if($dbupdateplugs = e107::getConfig('core')->get('plug_installed'))
|
||||
{
|
||||
// Read in each update file - this will add an entry to the $dbupdatep array if a potential update exists
|
||||
@ -1898,9 +1885,9 @@ function core_media_import($cat,$epath)
|
||||
'media_type' => $f['mime']
|
||||
);
|
||||
|
||||
if(!$sql->db_Select('core_media','media_url',"media_url = '".$fullpath."' LIMIT 1"))
|
||||
if(!$sql->select('core_media','media_url',"media_url = '".$fullpath."' LIMIT 1"))
|
||||
{
|
||||
if($sql->db_Insert("core_media",$insert))
|
||||
if($sql->insert("core_media",$insert))
|
||||
{
|
||||
$mes->add("Importing Media: ".$f['fname'], E_MESSAGE_SUCCESS);
|
||||
}
|
||||
|
@ -602,12 +602,12 @@ if (isset($_POST['optionsubmit']))
|
||||
$temp['upload_maxfilesize'] = $_POST['upload_maxfilesize'];
|
||||
$temp['upload_class'] = $_POST['upload_class'];
|
||||
$temp['upload_enabled'] = (FILE_UPLOADS ? $_POST['upload_enabled'] : 0);
|
||||
if ($temp['upload_enabled'] && !$sql->db_Select("links", "*", "link_url='upload.php' "))
|
||||
if ($temp['upload_enabled'] && !$sql->select("links", "*", "link_url='upload.php' "))
|
||||
{
|
||||
$sql->db_Insert("links", "0, '".LAN_UPLOAD."', 'upload.php', '', '', 1,0,0,0,0");
|
||||
}
|
||||
|
||||
if (!$temp['upload_enabled'] && $sql->db_Select("links", "*", "link_url='upload.php' "))
|
||||
if (!$temp['upload_enabled'] && $sql->select("links", "*", "link_url='upload.php' "))
|
||||
{
|
||||
$sql->db_Delete("links", "link_url='upload.php' ");
|
||||
}
|
||||
@ -798,8 +798,8 @@ switch ($action)
|
||||
break;
|
||||
|
||||
case 'view' :
|
||||
$sql->db_Select('upload', '*', "upload_id='{$id}'");
|
||||
$row = $sql->db_Fetch();
|
||||
$sql->select('upload', '*', "upload_id='{$id}'");
|
||||
$row = $sql->fetch();
|
||||
extract($row);
|
||||
|
||||
|
||||
@ -913,7 +913,7 @@ switch ($action)
|
||||
|
||||
$text .= "<tr><td class='forumheader3' style='text-align:center' colspan='6'>";
|
||||
|
||||
if (!$active_uploads = $sql->db_Select("upload", "*", "upload_active=0 ORDER BY upload_id ASC"))
|
||||
if (!$active_uploads = $sql->select("upload", "*", "upload_active=0 ORDER BY upload_id ASC"))
|
||||
{
|
||||
$text .= UPLLAN_19.".\n</td>\n</tr>";
|
||||
}
|
||||
|
@ -2236,10 +2236,10 @@ class users_admin_ui extends e_admin_ui
|
||||
{
|
||||
$usr_email = trim($result[0]);
|
||||
}
|
||||
if ($sql->db_Select('user','user_id, user_name, user_email',"user_email='".$usr_email."' "))
|
||||
if ($sql->select('user','user_id, user_name, user_email',"user_email='".$usr_email."' "))
|
||||
{
|
||||
$row = $sql->fetch();
|
||||
if ($sql->db_Update('user',"`user_email`='' WHERE `user_id` = '".$row['user_id']."' ") !== false)
|
||||
if ($sql->update('user',"`user_email`='' WHERE `user_id` = '".$row['user_id']."' ") !== false)
|
||||
{
|
||||
// echo "Deleting user email {$row['user_email']} for user {$row['user_name']}, id={$row['user_id']}<br />";
|
||||
$dodel = true;
|
||||
@ -2375,7 +2375,7 @@ class users_admin_ui extends e_admin_ui
|
||||
// $bantype = 2;
|
||||
// $ins = " AND user_join < ".strtotime("-30 days");
|
||||
// }
|
||||
// if ($sql->db_Select("user","user_id, user_name","user_ban= {$bantype}".$ins))
|
||||
// if ($sql->select("user","user_id, user_name","user_ban= {$bantype}".$ins))
|
||||
// {
|
||||
// $uList = $sql->db_getList();
|
||||
// foreach ($uList as $u)
|
||||
|
@ -562,14 +562,13 @@ class user_shortcodes extends e_shortcode
|
||||
$url = e107::getUrl();
|
||||
if(!$userjump = e107::getRegistry('userjump'))
|
||||
{
|
||||
// $sql->db_Select("user", "user_id, user_name", "`user_id` > ".intval($this->var['user_id'])." AND `user_ban`=0 ORDER BY user_id ASC LIMIT 1 ");
|
||||
$sql->gen("SELECT user_id, user_name FROM `#user` FORCE INDEX (PRIMARY) WHERE `user_id` > ".intval($this->var['user_id'])." AND `user_ban`=0 ORDER BY user_id ASC LIMIT 1 ");
|
||||
if ($row = $sql->fetch())
|
||||
{
|
||||
$userjump['next']['id'] = $row['user_id'];
|
||||
$userjump['next']['name'] = $row['user_name'];
|
||||
}
|
||||
// $sql->db_Select("user", "user_id, user_name", "`user_id` < ".intval($this->var['user_id'])." AND `user_ban`=0 ORDER BY user_id DESC LIMIT 1 ");
|
||||
|
||||
$sql->gen("SELECT user_id, user_name FROM `#user` FORCE INDEX (PRIMARY) WHERE `user_id` < ".intval($this->var['user_id'])." AND `user_ban`=0 ORDER BY user_id DESC LIMIT 1 ");
|
||||
if ($row = $sql->fetch())
|
||||
{
|
||||
|
@ -165,10 +165,10 @@ $nbr_cols = (defined("NEWSCAT_COLS")) ? NEWSCAT_COLS : $nbr_cols;
|
||||
ORDER BY news_datestamp DESC LIMIT 0,".NEWSCAT_AMOUNT;
|
||||
|
||||
$count = $sql->gen($cqry);
|
||||
//$count = $sql->db_Select("news", "*", "news_category='".intval($category_id)."' AND news_class IN (".USERCLASS_LIST.") AND (news_start=0 || news_start < ".time().") AND (news_end=0 || news_end>".time().") ORDER BY news_datestamp DESC LIMIT 0,".NEWSCAT_AMOUNT);
|
||||
//$count = $sql->select("news", "*", "news_category='".intval($category_id)."' AND news_class IN (".USERCLASS_LIST.") AND (news_start=0 || news_start < ".time().") AND (news_end=0 || news_end>".time().") ORDER BY news_datestamp DESC LIMIT 0,".NEWSCAT_AMOUNT);
|
||||
if($count)
|
||||
{
|
||||
while ($row = $sql->db_Fetch())
|
||||
while ($row = $sql->fetch())
|
||||
{
|
||||
$scbatch->setScVar('news_item', $row);
|
||||
//$row['category_name'] = $category_name;
|
||||
|
@ -172,9 +172,9 @@ class core_news_sef_url extends eUrlConfig
|
||||
|
||||
$sql = e107::getDb('url');
|
||||
$name = e107::getParser()->toDB($name);
|
||||
if($sql->db_Select('news', 'news_id', "news_sef='{$name}'")) // TODO - it'll be news_sef (new) field
|
||||
if($sql->select('news', 'news_id', "news_sef='{$name}'")) // TODO - it'll be news_sef (new) field
|
||||
{
|
||||
$name = $sql->db_Fetch();
|
||||
$name = $sql->fetch();
|
||||
$request->setRequestParam('name', $name['news_id']);
|
||||
}
|
||||
else $request->setRequestParam('name', 0);
|
||||
@ -200,9 +200,9 @@ class core_news_sef_url extends eUrlConfig
|
||||
|
||||
$sql = e107::getDb('url');
|
||||
$id = e107::getParser()->toDB($name);
|
||||
if($sql->db_Select('news_category', 'category_id', "category_sef='{$name}'")) // TODO - it'll be category_sef (new) field
|
||||
if($sql->select('news_category', 'category_id', "category_sef='{$name}'")) // TODO - it'll be category_sef (new) field
|
||||
{
|
||||
$name = $sql->db_Fetch();
|
||||
$name = $sql->fetch();
|
||||
$request->setRequestParam('name', $name['category_id']);
|
||||
}
|
||||
else $request->setRequestParam('name', 0);
|
||||
|
@ -572,7 +572,7 @@ class e_admin_log
|
||||
|
||||
/**
|
||||
* Logs an entry with all the data from an array, one field per line.
|
||||
* @deprecated
|
||||
* @deprecated Use e107::getLog()->addArray($arrayData)->save($event);
|
||||
* @param string $event - LAN define or string used as title in log
|
||||
* @param array $target - data to be logged
|
||||
* @param string $extra - if non-empty, it goes on the first line.
|
||||
|
@ -18,37 +18,13 @@ if (!defined('e107_INIT'))
|
||||
}
|
||||
/**
|
||||
* @DEPRECATED
|
||||
* Use e107::getParser()->parseTemplate("{USER_AVATAR=".$avatar."}",true); instead.
|
||||
* Use e107::getParser()->toAvatar() instead.
|
||||
*/
|
||||
function avatar($avatar)
|
||||
{
|
||||
$data = array('user_image' => $avatar);
|
||||
|
||||
return e107::getParser()->toAvatar($data, array('type'=>'url'));
|
||||
// return e107::getParser()->parseTemplate("{USER_AVATAR=".$avatar."}",true);
|
||||
|
||||
/*
|
||||
global $tp;
|
||||
if (stristr($avatar, '-upload-') !== false)
|
||||
{
|
||||
return e_AVATAR_UPLOAD.str_replace('-upload-', '', $avatar);
|
||||
}
|
||||
elseif (stristr($avatar, 'Binary') !== false)
|
||||
{
|
||||
$sqla = new db;
|
||||
preg_match("/Binary\s(.*?)\//", $avatar, $result);
|
||||
$sqla->db_Select('rbinary', '*', "binary_id='".$tp->toDB($result[1])."' ");
|
||||
$row = $sqla->db_Fetch();
|
||||
return $row['binary_data'];
|
||||
}
|
||||
elseif (strpos($avatar, 'http://') === false)
|
||||
{
|
||||
return SITEURLBASE.e_IMAGE_ABS."avatars/".$avatar;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $avatar;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ class eIPHandler
|
||||
}
|
||||
/*
|
||||
// See if the address is in the whitelist
|
||||
if ($sql->db_Select('banlist', '*', "`banlist_ip`='{$ban_ip}' AND `banlist_bantype` >= ".eIPHandler::BAN_TYPE_WHITELIST))
|
||||
if ($sql->select('banlist', '*', "`banlist_ip`='{$ban_ip}' AND `banlist_bantype` >= ".eIPHandler::BAN_TYPE_WHITELIST))
|
||||
{ // Got a whitelist entry for this
|
||||
//$admin_log->e_log_event(4, __FILE__."|".__FUNCTION__."@".__LINE__, "BANLIST_11", 'LAN_AL_BANLIST_11', $ban_ip, FALSE, LOG_TO_ROLLING);
|
||||
return FALSE;
|
||||
|
@ -137,9 +137,7 @@ class e_jshelper
|
||||
$ret .= "\t<e107action name='{$action}'>\n";
|
||||
foreach ($field_array as $field => $value)
|
||||
{
|
||||
//associative arrays only - no numeric keys!
|
||||
//to speed this up use $sql->db_Fetch();
|
||||
//when passing large data from the DB
|
||||
|
||||
if (is_numeric($field) || empty($field)) continue;
|
||||
|
||||
switch (gettype($value)) {
|
||||
@ -183,7 +181,10 @@ class e_jshelper
|
||||
}
|
||||
|
||||
if(null !== $action) echo $this->buildXmlResponse();
|
||||
while (@ob_end_flush());
|
||||
while (ob_get_length() !== false)
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -212,7 +213,10 @@ class e_jshelper
|
||||
$this->addResponseAction($action, $data_array);
|
||||
}
|
||||
if(null !== $action) echo $this->buildJSONResponse();
|
||||
while (@ob_end_flush());
|
||||
while (ob_get_length() !== false)
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -256,7 +260,10 @@ class e_jshelper
|
||||
{
|
||||
header('Content-type: text/html; charset='.CHARSET, true);
|
||||
echo $this->addTextResponse($data_text)->buildTextResponse();
|
||||
while (@ob_end_flush());
|
||||
while (ob_get_length() !== false)
|
||||
{
|
||||
ob_end_clean();
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -484,8 +484,7 @@ class rater
|
||||
|
||||
if($row = $sql->insert("rate", $insert))
|
||||
{
|
||||
//$row = $sql->db_Fetch();
|
||||
$edata = array(
|
||||
$edata = array(
|
||||
'like_pid' => $row,
|
||||
'like_table' => $table,
|
||||
'like_item_id' => $itemid,
|
||||
|
@ -245,15 +245,6 @@ function PreFile_Select($formid='prefile_selector')
|
||||
$filelist = array();
|
||||
$downloadList = array();
|
||||
|
||||
/*$sql->db_Select('download', '*', 'download_class != '.e_UC_NOBODY);
|
||||
while ($row = $sql->db_Fetch()) {
|
||||
extract($row);
|
||||
if($download_url)
|
||||
{
|
||||
$filelist[] = array('id' => $download_id, 'name' => $download_name, 'url' => $download_url, 'class' => $download_class);
|
||||
$downloadList[] = $download_url;
|
||||
}
|
||||
}*/
|
||||
|
||||
$tmp = $fl->get_files(e_FILE.'downloads/');
|
||||
foreach($tmp as $value)
|
||||
|
@ -15,28 +15,3 @@
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
/*
|
||||
$advanced['cat']['type'] = 'dropdown';
|
||||
$advanced['cat']['text'] = LAN_SEARCH_55.':';
|
||||
$advanced['cat']['list'][] = array('id' => 'all', 'title' => LAN_SEARCH_51);
|
||||
|
||||
$advanced_caption['id'] = 'cat';
|
||||
$advanced_caption['title']['all'] = LAN_SEARCH_56;
|
||||
|
||||
if ($sql -> db_Select("news_category", "category_id, category_name")) {
|
||||
while($row = $sql -> db_Fetch()) {
|
||||
$advanced['cat']['list'][] = array('id' => $row['category_id'], 'title' => $row['category_name']);
|
||||
$advanced_caption['title'][$row['category_id']] = 'News -> '.$row['category_name'];
|
||||
}
|
||||
}
|
||||
|
||||
$advanced['date']['type'] = 'date';
|
||||
$advanced['date']['text'] = LAN_SEARCH_50.':';
|
||||
|
||||
$advanced['match']['type'] = 'dropdown';
|
||||
$advanced['match']['text'] = LAN_SEARCH_52.':';
|
||||
$advanced['match']['list'][] = array('id' => 0, 'title' => LAN_SEARCH_53);
|
||||
$advanced['match']['list'][] = array('id' => 1, 'title' => LAN_SEARCH_54);
|
||||
*/
|
||||
|
||||
?>
|
@ -17,12 +17,12 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$query = $tp -> toDB($query);
|
||||
$results = $sql->db_Select("event", "*", "event_stake REGEXP('".$query."') OR event_ward REGEXP('".$query."') OR event_organisation REGEXP('".$query."') OR event_title REGEXP('".$query."')
|
||||
$results = $sql->select("event", "*", "event_stake REGEXP('".$query."') OR event_ward REGEXP('".$query."') OR event_organisation REGEXP('".$query."') OR event_title REGEXP('".$query."')
|
||||
OR event_location REGEXP('".$query."') OR event_details REGEXP('".$query."') OR event_thread REGEXP('".$query."') ");
|
||||
while (list($event_id, $event_stake, $event_ward, $event_organisation, $event_start, $event_end, $event_allday, , , $event_title, $event_location, $event_details, $event_author, $event_contact, $event_category, $event_url ) = $sql->fetch()) {
|
||||
|
||||
$sql2->db_select("event_cat", "event_cat_name, event_cat_icon", "event_cat_id='".$event_category."' ");
|
||||
list($event_cat_name, $event_cat_icon ) = $sql2->db_Fetch();
|
||||
$sql2->select("event_cat", "event_cat_name, event_cat_icon", "event_cat_id='".$event_category."' ");
|
||||
list($event_cat_name, $event_cat_icon ) = $sql2->fetch();
|
||||
|
||||
$event_stake_ = parsesearch($event_stake, $query);
|
||||
if (!$event_stake_) {
|
||||
|
@ -1226,65 +1226,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// print_a($plugs->plug_vars['adminLinks']['link']);
|
||||
|
||||
|
||||
|
||||
|
||||
/* echo "hello there";
|
||||
|
||||
$xml = e107::getXml();
|
||||
$xml->filter = array('@attributes' => FALSE,'description'=>FALSE,'administration' => FALSE); // .. and they're all going to need the same filter
|
||||
|
||||
if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
|
||||
{
|
||||
while ($row = $sql->db_Fetch())
|
||||
{
|
||||
extract($row); // plugin_id int(10) unsigned NOT NULL auto_increment,
|
||||
// plugin_name varchar(100) NOT NULL default '',
|
||||
// plugin_version varchar(10) NOT NULL default '',
|
||||
// plugin_path varchar(100) NOT NULL default '',
|
||||
// plugin_installflag tinyint(1) unsigned NOT NULL default '0',
|
||||
// plugin_addons text NOT NULL,
|
||||
|
||||
if (is_readable(e_PLUGIN.$plugin_path."/plugin.xml"))
|
||||
{
|
||||
$readFile = $xml->loadXMLfile(e_PLUGIN.$plugin_path.'/plugin.xml', true, true);
|
||||
if ($readFile === FALSE)
|
||||
{
|
||||
echo 'Error in file: '.e_PLUGIN.$plugin_path.'/plugin.xml'.'<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
loadLanFiles($plugin_path, 'admin');
|
||||
$eplug_name = $tp->toHTML($readFile['@attributes']['name'],FALSE,"defs, emotes_off");
|
||||
$eplug_conffile = $readFile['administration']['configFile'];
|
||||
$eplug_icon_small = $plugin_path.'/'.$readFile['administration']['iconSmall'];
|
||||
$eplug_icon = $plugin_path.'/'.$readFile['administration']['icon'];
|
||||
$eplug_caption = str_replace("'", '', $tp->toHTML($readFile['description'], FALSE, 'defs, emotes_off'));
|
||||
}
|
||||
}
|
||||
elseif (is_readable(e_PLUGIN.$plugin_path."/plugin.php"))
|
||||
{
|
||||
include(e_PLUGIN.$plugin_path."/plugin.php");
|
||||
}
|
||||
if (varset($eplug_conffile))
|
||||
{
|
||||
$eplug_name = $tp->toHTML($eplug_name,FALSE,"defs, emotes_off");
|
||||
$plugin_icon = $eplug_icon_small ? "<img class='icon S16' src='".e_PLUGIN.$eplug_icon_small."' alt='' />" : E_16_PLUGIN;
|
||||
$plugin_icon_32 = $eplug_icon ? "<img class='icon S32' src='".e_PLUGIN.$eplug_icon."' alt='' />" : E_32_PLUGIN;
|
||||
|
||||
$plugin_array['p-'.$plugin_path] = array('link' => e_PLUGIN.$plugin_path."/".$eplug_conffile, 'title' => $eplug_name, 'caption' => $eplug_caption, 'perms' => "P".$plugin_id, 'icon' => $plugin_icon, 'icon_32' => $plugin_icon_32);
|
||||
}
|
||||
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$plugin_array = array();
|
||||
}
|
||||
*/
|
||||
|
||||
ksort($plugin_array, SORT_STRING); // To FIX, without changing the current key format, sort by 'title'
|
||||
|
||||
if($linkStyle == "array" || $iconSize == 'assoc')
|
||||
|
@ -58,7 +58,7 @@ class alt_auth_base
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
$sql->db_Select('alt_auth', '*', "auth_type = '".$prefix."' ");
|
||||
$sql->select('alt_auth', '*', "auth_type = '".$prefix."' ");
|
||||
$parm = array();
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ class auth_login extends alt_auth_base
|
||||
|
||||
// See if the user's in the E107 database - otherwise they can go away
|
||||
global $sql, $tp;
|
||||
if (!$sql->db_Select('user', 'user_loginname, user_password', "user_loginname = '".$tp -> toDB($uname)."'"))
|
||||
if (!$sql->select('user', 'user_loginname, user_password', "user_loginname = '".$tp -> toDB($uname)."'"))
|
||||
{ // Invalid user
|
||||
$this->makeErrorText('User not found');
|
||||
return AUTH_NOUSER;
|
||||
|
@ -83,7 +83,7 @@ for($i = $start_year; $i <= $end_year; $i++)
|
||||
if ($i == $req_year)
|
||||
{
|
||||
$year_selector .= " selected='selected'";
|
||||
if ($bcSql->db_Select("news", "news_id, news_datestamp, news_class", "news_datestamp > {$start} AND news_datestamp < {$end}"))
|
||||
if ($bcSql->select("news", "news_id, news_datestamp, news_class", "news_datestamp > {$start} AND news_datestamp < {$end}"))
|
||||
{
|
||||
while ($news = $bcSql->fetch())
|
||||
{
|
||||
|
@ -95,9 +95,9 @@ $feed['limit'] = '9';
|
||||
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
$rss = array();
|
||||
if($items = $sql -> db_Select('chatbox', "*", "cb_blocked=0 ORDER BY cb_datestamp DESC LIMIT 0,".$this -> limit)){
|
||||
if($items = $sql->select('chatbox', "*", "cb_blocked=0 ORDER BY cb_datestamp DESC LIMIT 0,".$this -> limit)){
|
||||
$i=0;
|
||||
while($rowrss = $sql -> db_Fetch()){
|
||||
while($rowrss = $sql ->fetch()){
|
||||
$tmp = explode(".", $rowrss['cb_nick']);
|
||||
$rss[$i]['author'] = $tmp[1];
|
||||
$rss[$i]['author_email'] = '';
|
||||
|
@ -106,80 +106,3 @@ class download_rss // plugin-folder + '_rss'
|
||||
return $rss;
|
||||
}
|
||||
}
|
||||
|
||||
/* OLD V1 CODE LEFT FOR REFERENCE - TO BE DELETED
|
||||
|
||||
//##### create feed for admin, return array $eplug_rss_feed --------------------------------
|
||||
// Download
|
||||
$feed['name'] = LAN_PLUGIN_DOWNLOAD_NAME;
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = '';
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_8;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$eplug_rss_feed[] = $feed;
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
||||
// Download categories for admin import.
|
||||
$sqli = e107::getDb('download');
|
||||
|
||||
if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
|
||||
{
|
||||
while($rowi = $sqli ->fetch())
|
||||
{
|
||||
$feed['name'] = LAN_PLUGIN_DOWNLOAD_NAME.' > '.$rowi['download_category_name'];
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = $rowi['download_category_id'];
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_11.' '.$rowi['download_category_name'];
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$eplug_rss_feed[] = $feed;
|
||||
}
|
||||
}
|
||||
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
|
||||
if($topic_id && is_numeric($topic_id))
|
||||
{
|
||||
$topic = "d.download_category='" . intval($topic_id) . "' AND ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$topic = "";
|
||||
}
|
||||
$path='';
|
||||
//$class_list = "0,251,252,253";
|
||||
$query = "SELECT d.*, dc.* FROM #download AS d LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id WHERE {$topic} d.download_active > 0 AND d.download_class IN (".USERCLASS_LIST.") ORDER BY d.download_datestamp DESC LIMIT 0,".$this -> limit;
|
||||
$sql -> db_Select_gen($query);
|
||||
|
||||
// $sql->db_Select("download", "*", "{$topic} download_active > 0 AND download_class IN (".$class_list.") ORDER BY download_datestamp DESC LIMIT 0,".$this -> limit);
|
||||
$tmp = $sql->db_getList();
|
||||
$rss = array();
|
||||
$loop=0;
|
||||
foreach($tmp as $value)
|
||||
{
|
||||
if($value['download_author'])
|
||||
{
|
||||
$nick = preg_replace("/[0-9]+\./", "", $value['download_author']);
|
||||
$rss[$loop]['author'] = $nick;
|
||||
}
|
||||
$rss[$loop]['author_email'] = $value['download_author_email'];
|
||||
$rss[$loop]['title'] = $value['download_name'];
|
||||
$rss[$loop]['link'] = $e107->base_path."download/download.php?view.".$value['download_id'];
|
||||
$rss[$loop]['description'] = ($rss_type == 3 ? $value['download_description'] : $value['download_description']);
|
||||
$rss[$loop]['category_name'] = $value['download_category_name'];
|
||||
$rss[$loop]['category_link'] = $e107->base_path."download/download.php?list.".$value['download_category_id'];
|
||||
$rss[$loop]['enc_url'] = $e107->base_path."download/request.php?".$value['download_id'];
|
||||
$rss[$loop]['enc_leng'] = $value['download_filesize'];
|
||||
$rss[$loop]['enc_type'] = $this->getmime($value['download_url']);
|
||||
$rss[$loop]['datestamp'] = $value['download_datestamp'];
|
||||
$loop++;
|
||||
}
|
||||
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
$eplug_rss_data[] = $rss;
|
||||
*/
|
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,7 @@ class forumStats
|
||||
$sql->gen($query);
|
||||
$most_viewedArray = $sql->db_getList();
|
||||
|
||||
/*$sql->db_Select("user", "user_id, user_name, user_forums", "ORDER BY user_forums DESC LIMIT 0, 10", "no_where");
|
||||
/*$sql->select("user", "user_id, user_name, user_forums", "ORDER BY user_forums DESC LIMIT 0, 10", "no_where");
|
||||
$posters = $sql -> db_getList();
|
||||
$top_posters = array();
|
||||
foreach($posters as $poster)
|
||||
@ -199,7 +199,7 @@ class forumStats
|
||||
GROUP BY t_user
|
||||
ORDER BY ucount DESC
|
||||
LIMIT 0,10";
|
||||
$sql -> db_Select_gen($query);
|
||||
$sql -> gen($query);
|
||||
$posters = $sql -> db_getList();
|
||||
$top_topic_starters = array();
|
||||
foreach($posters as $poster)
|
||||
@ -216,7 +216,7 @@ class forumStats
|
||||
GROUP BY t_user
|
||||
ORDER BY ucount DESC
|
||||
LIMIT 0,10";
|
||||
$sql -> db_Select_gen($query);
|
||||
$sql -> gen($query);
|
||||
$posters = $sql -> db_getList();
|
||||
|
||||
$top_repliers = array();
|
||||
@ -516,7 +516,6 @@ class forumStats
|
||||
ORDER BY ue.user_plugin_forum_posts DESC LIMIT {$this->from}, {$this->view}
|
||||
";
|
||||
|
||||
// $top_forum_posters = $sql->db_Select("user", "*", "`user_forums` > 0 ORDER BY user_forums DESC LIMIT ".$from.", ".$view."");
|
||||
$text = "
|
||||
<div>
|
||||
<table style='width:95%' class='table table-striped fborder'>
|
||||
|
@ -56,7 +56,7 @@ if($msg)
|
||||
$fi = new e_file;
|
||||
$mask = ".*_".USERID."_FT.*";
|
||||
$fileList = $fi->get_files(e_UPLOAD, $mask);
|
||||
if($sql->db_Select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'")) // FIXME new forum db structure
|
||||
if($sql->select('forum_thread','thread_id, thread_thread, thread_parent', "thread_thread REGEXP '.*_".USERID."_FT.*'")) // FIXME new forum db structure
|
||||
{
|
||||
$threadList = $sql->db_getList();
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class e107_import extends base_import_class
|
||||
{
|
||||
case 'users' :
|
||||
$query = "SELECT * FROM {$this->DBPrefix}user WHERE `user_id` != 1";
|
||||
$result = $this->ourDB->db_Select_gen($query);
|
||||
$result = $this->ourDB->gen($query);
|
||||
|
||||
if ($result === false) return false;
|
||||
break;
|
||||
|
@ -195,388 +195,3 @@ exit;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
|
||||
e107::lan('linkwords', true); // e_PLUGIN.'linkwords/languages/'.e_LANGUAGE.'_admin.php'
|
||||
|
||||
define('LW_CACHE_TAG', 'nomd5_linkwords');
|
||||
|
||||
$pref = e107::getConfig()->getPref();
|
||||
|
||||
// print_a($pref['lw_context_visibility']);
|
||||
|
||||
|
||||
$mes = e107::getMessage();
|
||||
$tp = e107::getParser();
|
||||
$frm = e107::getForm();
|
||||
|
||||
$lw_context_areas = array(
|
||||
'TITLE' => LWLAN_33,
|
||||
'SUMMARY' => LWLAN_34,
|
||||
'BODY' => LWLAN_35,
|
||||
'DESCRIPTION' => LWLAN_36,
|
||||
'USER_TITLE' => LWLAN_40,
|
||||
'USER_BODY' => LWLAN_41
|
||||
// Don't do the next three - linkwords are meaningless on them
|
||||
// 'olddefault' => LWLAN_37,
|
||||
// 'linktext' => LWLAN_38,
|
||||
// 'rawtext' => LWLAN_39'
|
||||
);
|
||||
|
||||
// Yes, I know its a silly order - but that's history!
|
||||
$lwaction_vals = array(1=>LAN_INACTIVE, 0=>LWLAN_52, 2=>LWLAN_53, 3=>LWLAN_54);
|
||||
$frm = e107::getForm();
|
||||
// Generate dropdown for possible actions on finding a linkword
|
||||
function lw_act_opts($curval)
|
||||
{
|
||||
global $lwaction_vals;
|
||||
$ret = '';
|
||||
foreach ($lwaction_vals as $opt => $val)
|
||||
{
|
||||
$selected = ($curval == $opt ? "selected='selected'" : '');
|
||||
$ret .= "<option value='{$opt}' {$selected}>{$val}</option>\n";
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
$deltest = array_flip($_POST);
|
||||
|
||||
if(isset($deltest[LAN_DELETE]))
|
||||
{
|
||||
$delete_id = intval(str_replace('delete_', '', $deltest[LAN_DELETE]));
|
||||
|
||||
if ($sql->db_Count('linkwords', '(*)', "WHERE linkword_id = ".$delete_id))
|
||||
{
|
||||
$sql->db_Delete('linkwords', 'linkword_id='.$delete_id);
|
||||
e107::getLog()->add('LINKWD_03','ID: '.$delete_id,'');
|
||||
$e107->ecache->clear_sys(LW_CACHE_TAG);
|
||||
//$message = LWLAN_19;
|
||||
$mes->addSuccess(LAN_DELETED);
|
||||
}
|
||||
}
|
||||
|
||||
if(e_QUERY)
|
||||
{
|
||||
$lw_qs = explode('.', e_QUERY);
|
||||
if (!isset($lw_qs[0])) $lw_qs[0] = 'words';
|
||||
if (!isset($lw_qs[1])) $lw_qs[1] = -1;
|
||||
$action = $lw_qs[0];
|
||||
$id = intval($lw_qs[1]);
|
||||
}
|
||||
if (!isset($action)) $action = 'words';
|
||||
|
||||
if (isset($_POST['saveopts_linkword']))
|
||||
{ // Save options page
|
||||
// Array of context flags
|
||||
$pref['lw_context_visibility'] = array(
|
||||
'OLDDEFAULT' => FALSE,
|
||||
'TITLE' => FALSE,
|
||||
'USER_TITLE' => FALSE,
|
||||
'SUMMARY' => FALSE,
|
||||
'BODY' => FALSE,
|
||||
'USER_BODY' => FALSE,
|
||||
'DESCRIPTION' => FALSE,
|
||||
'LINKTEXT' => FALSE,
|
||||
'RAWTEXT' => FALSE
|
||||
);
|
||||
foreach ($_POST['lw_visibility_area'] as $can_see)
|
||||
{
|
||||
if (key_exists($can_see,$lw_context_areas))
|
||||
{
|
||||
$pref['lw_context_visibility'][$can_see] = TRUE;
|
||||
}
|
||||
}
|
||||
// Text area for 'exclude' pages - use same method as for menus
|
||||
$pagelist = explode("\r\n", $_POST['linkword_omit_pages']);
|
||||
for ($i = 0 ; $i < count($pagelist) ; $i++)
|
||||
{
|
||||
$pagelist[$i] = trim($pagelist[$i]);
|
||||
}
|
||||
$pref['lw_page_visibility'] = '2-'.implode("|", $pagelist); // '2' for 'hide on specified pages'
|
||||
$pref['lw_ajax_enable'] = isset($_POST['lw_ajax_enable']);
|
||||
$pref['lw_notsamepage'] = isset($_POST['lw_notsamepage']);
|
||||
save_prefs();
|
||||
$logString = implode(', ',$pref['lw_context_visibility']).'[!br!]'.$pref['lw_page_visibility'].'[!br!]'.$pref['lw_ajax_enable'].'[!br!]'.$pref['lw_notsamepage'];
|
||||
e107::getCache()->clear_sys(LW_CACHE_TAG);
|
||||
e107::getLog()->add('LINKWD_04',$logString,'');
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['submit_linkword']) || isset($_POST['update_linkword']))
|
||||
{
|
||||
if(!$_POST['linkwords_word'] && $_POST['linkwords_url'])
|
||||
{ // Key fields empty
|
||||
$mes->addError(LAN_REQUIRED_BLANK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['linkword_word'] = $tp->toDB($_POST['linkword_word']);
|
||||
$data['linkword_link'] = $tp->toDB($_POST['linkword_link']);
|
||||
$data['linkword_tooltip'] = $tp->toDB($_POST['linkword_tooltip']);
|
||||
$data['linkword_tip_id'] = intval($_POST['linkword_tip_id']);
|
||||
$data['linkword_active'] = intval($_POST['linkword_active']);
|
||||
$data['linkword_newwindow'] = isset($_POST['linkword_newwindow']) ? 1 : 0;
|
||||
|
||||
$logString = implode('[!br!]',$data);
|
||||
if (isset($_POST['submit_linkword']))
|
||||
{
|
||||
if ($sql->db_Insert('linkwords', $data))
|
||||
{
|
||||
e107::getLog()->add('LINKWD_01',$logString,'');
|
||||
$mes->addSuccess(LAN_CREATED);
|
||||
}
|
||||
else
|
||||
{
|
||||
//$message = LWLAN_57;
|
||||
$mes->addError(LAN_CREATED_FAILED);
|
||||
}
|
||||
}
|
||||
elseif (isset($_POST['update_linkword']))
|
||||
{
|
||||
$id = intval(varset($_POST['lw_edit_id'],0));
|
||||
if (($id > 0) && $sql->db_UpdateArray('linkwords', $data, ' WHERE `linkword_id`='.$id))
|
||||
{
|
||||
$mes->addSuccess(LAN_UPDATED);
|
||||
$logString = 'ID: '.$id.'[!br!]'.$logString;
|
||||
e107::getLog()->add('LINKWD_02',$logString,'');
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->addError(LAN_UPDATED_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
e107::getCache()->clear_sys(LW_CACHE_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
$ns->tablerender($caption, $mes->render() . $text);
|
||||
|
||||
|
||||
$chkNewWindow = " checked='checked'"; // Open links in new window by default
|
||||
if($action == "edit")
|
||||
{
|
||||
if($sql -> db_Select("linkwords", "*", "linkword_id=".$id))
|
||||
{
|
||||
$row = $sql -> db_Fetch();
|
||||
extract($row);
|
||||
$chkNewWindow = $row['linkword_newwindow'] ? " checked='checked'" : ''; // Open links in new window by default
|
||||
define("LW_EDIT", TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$linkword_word = '';
|
||||
$linkword_link = '';
|
||||
$linkword_active = '';
|
||||
$linkword_tooltip = '';
|
||||
$linkword_tip_id = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (($action == 'words') || ($action == 'edit'))
|
||||
{
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."?words'>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".LWLAN_21."</td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='linkword_word' size='40' value='".$linkword_word."' maxlength='100' />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LWLAN_6."</td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='linkword_link' size='60' value='".$linkword_link."' maxlength='250' /><br />
|
||||
<input type='checkbox' name='linkword_newwindow' value='1'{$chkNewWindow} /> ".LWLAN_55."
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LWLAN_50."</td>
|
||||
<td>
|
||||
<textarea rows='3' cols='80' class='tbox' name='linkword_tooltip'>".$linkword_tooltip."</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LWLAN_62."</td>
|
||||
<td>
|
||||
<input class='tbox' type='text' name='linkword_tip_id' size='10' value='".$linkword_tip_id."' maxlength='10' /><span class='field-help'>".LWLAN_63."</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LWLAN_22."</td>
|
||||
<td>
|
||||
<select class='tbox' name='linkword_active'>".lw_act_opts($linkword_active)."</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='buttons-bar center'>
|
||||
".
|
||||
(defined("LW_EDIT") ? $frm->admin_button('update_linkword','no-value','update',LAN_UPDATE) . "<input type='hidden' name='lw_edit_id' value='{$id}' />" : $frm->admin_button('submit_linkword','no-value','submit',LAN_CREATE))."
|
||||
</div>
|
||||
</form>\n";
|
||||
|
||||
|
||||
$ns -> tablerender(LWLAN_31, $text);
|
||||
}
|
||||
|
||||
if (($action == 'words') || ($action == 'edit'))
|
||||
{
|
||||
|
||||
|
||||
$text = "<div class='center'>\n";
|
||||
if(!$sql -> db_Select("linkwords"))
|
||||
{
|
||||
//$text .= LWLAN_4;
|
||||
$mes->addInfo(LWLAN_4);
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = "
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col style='width: 5%; vertical-align:top;' />
|
||||
<col style='width: 15%; vertical-align:top;' />
|
||||
<col style='width: 20%; vertical-align:top;' />
|
||||
<col style='width: 10%; vertical-align:top;' />
|
||||
<col style='width: 25%; vertical-align:top;' />
|
||||
<col style='width: 5%; vertical-align:top;' />
|
||||
<col style='width: 10%; vertical-align:top; text-align: center;' />
|
||||
<col style='width: 15%; vertical-align:top; text-align: center;' />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".LAN_ID."</td>
|
||||
<td>".LWLAN_5."</td>
|
||||
<td>".LWLAN_6."</td>
|
||||
<td>".LWLAN_56."</td>
|
||||
<td>".LWLAN_50."</td>
|
||||
<td>".LWLAN_60."</td>
|
||||
<td>".LWLAN_7."</td>
|
||||
<td>".LAN_OPTIONS."</td>
|
||||
</tr>\n";
|
||||
|
||||
while($row = $sql->db_Fetch())
|
||||
{
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>{$row['linkword_id']}</td>
|
||||
<td>{$row['linkword_word']}</td>
|
||||
<td>{$row['linkword_link']}</td>
|
||||
<td>".($row['linkword_newwindow'] ? LAN_YES : LAN_NO)."</td>
|
||||
<td>{$row['linkword_tooltip']}</td>
|
||||
<td>".($row['linkword_tip_id'] > 0 ? $row['linkword_tip_id'] : '')."</td>
|
||||
<td>".$lwaction_vals[$row['linkword_active']]."</td>
|
||||
<td>
|
||||
<form action='".e_SELF."' method='post' id='myform_{$row['linkword_id']}' onsubmit=\"return jsconfirm('".LWLAN_18." [ID: {$row['linkword_id']} ]')\">
|
||||
<div>
|
||||
<input class='btn btn-default button' type='button' onclick=\"document.location='".e_SELF."?edit.{$row['linkword_id']}'\" value='".LAN_EDIT."' id='edit_{$row['linkword_id']}' name='edit_linkword_id' />
|
||||
<input class='btn btn-default button' type='submit' value='".LAN_DELETE."' id='delete_{$row['linkword_id']}' name='delete_{$row['linkword_id']}' />
|
||||
</div>
|
||||
</form>\n
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
$text .= "</table>";
|
||||
}
|
||||
|
||||
$ns->tablerender(LWLAN_11, $mes->render() . $text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($action=='options')
|
||||
{
|
||||
$menu_pages = substr($pref['lw_page_visibility'],2); // Knock off the 'show/hide' flag
|
||||
$menu_pages = str_replace("|", "\n", $menu_pages);
|
||||
$AjaxEnable = varset($pref['lw_ajax_enable'],0);
|
||||
$text = "
|
||||
<div>
|
||||
<form method='post' action='".e_SELF."?options'>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col style='width: 30%; />
|
||||
<col style='width: 70%; />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>".LWLAN_26."</td>
|
||||
<td>";
|
||||
foreach ($lw_context_areas as $lw_key=>$lw_desc)
|
||||
{
|
||||
$checked = $pref['lw_context_visibility'][$lw_key] ? "checked='checked'" : '';
|
||||
$text .= "<input type='checkbox' name='lw_visibility_area[]' value='{$lw_key}' {$checked} /> {$lw_desc}<br />";
|
||||
}
|
||||
$text .= "<span class='field-help'>".LWLAN_27."</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LWLAN_28."</td>
|
||||
<td><textarea rows='5' cols='60' class='tbox' name='linkword_omit_pages' >".$menu_pages."</textarea><span class='field-help'>".LWLAN_29."</span>
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
$checked = varset($pref['lw_ajax_enable'],0) ? 'checked=checked' : '';
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".LWLAN_59."</td>
|
||||
<td><input type='checkbox' name='lw_ajax_enable' {$checked} /></td>
|
||||
</tr>";
|
||||
|
||||
$checked = varset($pref['lw_notsamepage'],0) ? 'checked=checked' : '';
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>".LWLAN_64."</td>
|
||||
<td><input type='checkbox' name='lw_notsamepage' {$checked} /><span class='field-help'>".LWLAN_65."</span></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<div class='buttons-bar center'>
|
||||
".$frm->admin_button('saveopts_linkword','no-value','submit', LAN_UPDATE)."
|
||||
</div>
|
||||
</form>
|
||||
</div>\n";
|
||||
|
||||
$ns -> tablerender(LAN_OPTIONS, $text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function admin_config_adminmenu()
|
||||
{
|
||||
if (e_QUERY)
|
||||
{
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$action = $tmp[0];
|
||||
}
|
||||
if (!isset($action) || ($action == ""))
|
||||
{
|
||||
$action = "words";
|
||||
}
|
||||
$var['words']['text'] = LWLAN_24;
|
||||
$var['words']['link'] = "admin_config.php";
|
||||
|
||||
$var['options']['text'] = LAN_OPTIONS;
|
||||
$var['options']['link'] ="admin_config.php?options";
|
||||
|
||||
show_admin_menu(LWLAN_23, $action, $var);
|
||||
}
|
||||
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
*/
|
||||
|
||||
|
@ -1397,7 +1397,7 @@ class siteStats
|
||||
$pars = make_bits('statScreen',$act); // Get the query, plus maybe date for heading
|
||||
if (!is_array($pars)) return $pars; // Return error if necessary
|
||||
|
||||
if ($entries = $sql->db_Select('logstats', 'log_data', $pars['query']))
|
||||
if ($entries = $sql->select('logstats', 'log_data', $pars['query']))
|
||||
{
|
||||
$row = $sql -> fetch();
|
||||
$statScreen = unserialize($row['log_data']);
|
||||
|
@ -154,7 +154,7 @@ function export_stats($export_type, $export_date, $export_filter, $first_date,
|
||||
{
|
||||
$stat_types = array( 1 => 'day', 2 => 'month', 3 => 'year', 4 => 'alltime', 5 => 'all_detail');
|
||||
global $sql, $e107;
|
||||
$sql -> db_Select("logstats", "*", "{$export_filter} ");
|
||||
$sql ->select("logstats", "*", "{$export_filter} ");
|
||||
|
||||
$export_text = ''; // Accumulate output string
|
||||
$export_array = array();
|
||||
|
@ -1545,12 +1545,7 @@ class news_front
|
||||
|
||||
$newsAr = $sql -> db_getList();
|
||||
$news_total=$sql->total_results;
|
||||
// Get number of entries
|
||||
//$sql -> db_Select_gen("SELECT FOUND_ROWS()");
|
||||
// $frows = $sql -> db_Fetch();
|
||||
//$news_total = $frows[0];
|
||||
|
||||
//echo "<br />Total ".$news_total." items found, ".count($newsAr)." displayed, Interval = {$interval}<br /><br />";
|
||||
|
||||
$p_title = ($this->action == "item") ? $newsAr[1]['news_title'] : $tp->toHTML($newsAr[1]['category_name'],FALSE,'TITLE');
|
||||
|
||||
|
@ -610,7 +610,7 @@ class newsletter
|
||||
$vs_text = '';
|
||||
|
||||
|
||||
if(!$nl_sql->db_Select('newsletter', '*', 'newsletter_id='.$p_id))// Check if newsletter id is available
|
||||
if(!$nl_sql->select('newsletter', '*', 'newsletter_id='.$p_id))// Check if newsletter id is available
|
||||
{
|
||||
$mes->addError(NLLAN_56);
|
||||
$vs_text .= "<div class='buttons-bar center'>
|
||||
|
@ -8,16 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
if($sql->db_Select('page', 'page_id, page_title', "menu_name=''"))
|
||||
{
|
||||
$front_page['custom']['title'] = FRTLAN_30;
|
||||
while($row = $sql->db_Fetch())
|
||||
{
|
||||
$front_page['custom']['page'][] = array('page' => 'page.php?'.$row['page_id'], 'title' => $row['page_title']);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
@ -175,7 +175,7 @@ if (isset($_POST['pm_maint_execute']))
|
||||
if(isset($_POST['addlimit']))
|
||||
{
|
||||
$id = intval($_POST['newlimit_class']);
|
||||
if($sql->db_Select('generic','gen_id',"gen_type = 'pm_limit' AND gen_datestamp = ".$id))
|
||||
if($sql->select('generic','gen_id',"gen_type = 'pm_limit' AND gen_datestamp = ".$id))
|
||||
{
|
||||
$mes->addInfo(ADLAN_PM_5); // 'Limit for selected user class already exists'
|
||||
}
|
||||
|
@ -274,7 +274,6 @@ class poll
|
||||
{
|
||||
if ($_POST['votea'])
|
||||
{
|
||||
// $sql -> db_Select("polls", "*", "poll_vote_userclass!=255 AND poll_type=1 ORDER BY poll_datestamp DESC LIMIT 0,1");
|
||||
$row = $pollArray;
|
||||
extract($row);
|
||||
$poll_votes = varset($poll_votes);
|
||||
|
@ -138,7 +138,8 @@ class rss_ui extends e_admin_ui
|
||||
$rssVals['rss_limit'] = intval(varset($_POST['limit'][$key], '0'));
|
||||
|
||||
$sql->insert("rss", $rssVals);
|
||||
e107::getLog()->logArrayAll('RSS_04',$rssVals);
|
||||
e107::getLog()->addArray($rssVals)->save('RSS_04');
|
||||
// e107::getLog()->logArrayAll('RSS_04',$rssVals);
|
||||
}
|
||||
$message = count($_POST['importid'])." ".RSS_LAN_ADMIN_18;
|
||||
return $message;
|
||||
@ -220,9 +221,9 @@ class rss_ui extends e_admin_ui
|
||||
$feedlist[] = $feed;
|
||||
|
||||
// News categories
|
||||
if($sqli -> db_Select("news_category", "*","category_id!='' ORDER BY category_name "))
|
||||
if($sqli ->select("news_category", "*","category_id!='' ORDER BY category_name "))
|
||||
{
|
||||
while($rowi = $sqli -> db_Fetch())
|
||||
while($rowi = $sqli ->fetch())
|
||||
{
|
||||
$feed['name'] = ADLAN_0.' > '.$rowi['category_name'];
|
||||
$feed['url'] = 'news';
|
||||
@ -247,9 +248,9 @@ class rss_ui extends e_admin_ui
|
||||
$feedlist[] = $feed;
|
||||
|
||||
// Download categories
|
||||
if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
|
||||
if($sqli ->select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
|
||||
{
|
||||
while($rowi = $sqli -> db_Fetch())
|
||||
while($rowi = $sqli ->fetch())
|
||||
{
|
||||
$feed['name'] = ADLAN_24.' > '.$rowi['download_category_name'];
|
||||
$feed['url'] = 'download';
|
||||
@ -390,651 +391,3 @@ class rss_form_ui extends e_admin_form_ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// ------------------------------- Legacy Code -------------------------------
|
||||
/*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once(e_ADMIN."auth.php");
|
||||
|
||||
$imagedir = e_IMAGE."admin_images/";
|
||||
require_once(e_PLUGIN.'rss_menu/rss_shortcodes.php');
|
||||
$rss = new rss;
|
||||
|
||||
global $tp;
|
||||
$mes = e107::getMessage();
|
||||
|
||||
|
||||
// Delete entry
|
||||
if(isset($_POST['delete']))
|
||||
{
|
||||
$d_idt = array_keys($_POST['delete']);
|
||||
$message = ($sql -> db_Delete("rss", "rss_id=".intval($d_idt[0]))) ? LAN_DELETED : LAN_DELETED_FAILED;
|
||||
e107::getLog()->add('RSS_01','ID: '.intval($d_idt[0]).' - '.$message,E_LOG_INFORMATIVE,'');
|
||||
e107::getCache()->clear("rss");
|
||||
}
|
||||
|
||||
// Create rss feed
|
||||
if(isset($_POST['create_rss']))
|
||||
{
|
||||
$message = $rss -> dbrss("create");
|
||||
}
|
||||
|
||||
// Update rss feed
|
||||
if(isset($_POST['update_rss']))
|
||||
{
|
||||
$message = $rss -> dbrss("update");
|
||||
}
|
||||
|
||||
// Import rss feed
|
||||
if(isset($_POST['import_rss']))
|
||||
{
|
||||
$message = $rss -> dbrssimport();
|
||||
}
|
||||
|
||||
// Update_limit
|
||||
if(isset($_POST['update_limit']))
|
||||
{
|
||||
$message = $rss -> dbrsslimit();
|
||||
}
|
||||
|
||||
// Update options
|
||||
if(isset($_POST['updatesettings']))
|
||||
{
|
||||
$message = $rss->dboptions();
|
||||
}
|
||||
|
||||
// Config check
|
||||
if($rss->file_check())
|
||||
{
|
||||
$message = RSS_LAN_ERROR_2; // Space found in file.
|
||||
}
|
||||
|
||||
// Render message
|
||||
if(isset($message))
|
||||
{
|
||||
$mes->add($message);
|
||||
// $rss->show_message('', $message);
|
||||
}
|
||||
|
||||
// Get template
|
||||
/*
|
||||
if (is_readable(THEME."rss_template.php"))
|
||||
{
|
||||
require_once(THEME."rss_template.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(e_PLUGIN."rss_menu/rss_template.php");
|
||||
}*/
|
||||
/*
|
||||
|
||||
$frm = e107::getForm();
|
||||
|
||||
// Admin : rss listing
|
||||
if(!isset($RSS_ADMIN_LIST_HEADER))
|
||||
{
|
||||
|
||||
$RSS_ADMIN_LIST_HEADER = "
|
||||
<div style='text-align:center;'>
|
||||
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
|
||||
<table class='table adminlist'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='white-space:nowrap;'>{RSS_ADMIN_CAPTION=id,LAN_ID}</th>
|
||||
<th style='white-space:nowrap;'>{RSS_ADMIN_CAPTION=name,LAN_NAME}</th>
|
||||
<th style='white-space:nowrap;'>{RSS_ADMIN_CAPTION=path,LAN_PLUGIN_FOLDER}</th>
|
||||
<th style='white-space:nowrap;'>{RSS_ADMIN_CAPTION=url,LAN_URL}</th>
|
||||
<th style='white-space:nowrap;'>".RSS_LAN_ADMIN_12."</th>
|
||||
<th style='white-space:nowrap;'>{RSS_ADMIN_CAPTION=limit,LAN_LIMIT}</th>
|
||||
<th style='white-space:nowrap;'>".LAN_OPTIONS."</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>";
|
||||
}
|
||||
if(!isset($RSS_ADMIN_LIST_TABLE))
|
||||
{
|
||||
$RSS_ADMIN_LIST_TABLE = "
|
||||
<tr>
|
||||
<td>{RSS_ADMIN_ID}</td>
|
||||
<td>{RSS_ADMIN_NAME}</td>
|
||||
<td>{RSS_ADMIN_PATH}</td>
|
||||
<td>{RSS_ADMIN_URL}</td>
|
||||
<td>{RSS_ADMIN_TOPICID}</td>
|
||||
<td>{RSS_ADMIN_LIMIT}</td>
|
||||
<td class='center'>{RSS_ADMIN_OPTIONS}</td>
|
||||
</tr>";
|
||||
}
|
||||
if(!isset($RSS_ADMIN_LIST_FOOTER))
|
||||
{
|
||||
$RSS_ADMIN_LIST_FOOTER = "
|
||||
<tr>
|
||||
<td class='buttons-bar center' colspan='7'>
|
||||
{RSS_ADMIN_LIMITBUTTON}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>";
|
||||
}
|
||||
|
||||
// Admin : rss create/edit
|
||||
if(!isset($RSS_ADMIN_CREATE_TABLE))
|
||||
{
|
||||
$RSS_ADMIN_CREATE_TABLE = "
|
||||
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
|
||||
<table class='table adminform'>
|
||||
<tr>
|
||||
<td style='width:12%'>".LAN_NAME."</td>
|
||||
<td>{RSS_ADMIN_FORM_NAME}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_URL."</td>
|
||||
<td>{RSS_ADMIN_FORM_URL}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".RSS_LAN_ADMIN_12."</td>
|
||||
<td>{RSS_ADMIN_FORM_TOPICID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_PLUGIN_FOLDER."</td>
|
||||
<td>{RSS_ADMIN_FORM_PATH}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_DESCRIPTION."</td>
|
||||
<td>{RSS_ADMIN_FORM_TEXT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_LIMIT."</td>
|
||||
<td>{RSS_ADMIN_FORM_LIMIT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".LAN_VISIBILITY."</td>
|
||||
<td>{RSS_ADMIN_FORM_CLASS}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center;'>{RSS_ADMIN_FORM_CREATEBUTTON}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>";
|
||||
}
|
||||
|
||||
// Admin : rss options
|
||||
if(!isset($RSS_ADMIN_OPTIONS_TABLE))
|
||||
{
|
||||
$RSS_ADMIN_OPTIONS_TABLE = "
|
||||
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
|
||||
<table class='table adminform'>
|
||||
<tr>
|
||||
<td>".RSS_LAN_ADMIN_13."</td>
|
||||
<td>
|
||||
<input type='checkbox' name='rss_othernews' value='1' ".(vartrue($pref['rss_othernews']) == 1 ? " checked='checked' " : "")." />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".RSS_LAN_ADMIN_19."</td>
|
||||
<td>
|
||||
<input type='checkbox' name='rss_summarydiz' value='1' ".(vartrue($pref['rss_summarydiz']) == 1 ? " checked='checked' " : "")." />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".RSS_LAN_ADMIN_33."</td>
|
||||
<td>
|
||||
<input type='checkbox' name='rss_shownewsimage' value='1' ".(vartrue($pref['rss_shownewsimage']) == 1 ? " checked='checked' " : "")." />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class='buttons-bar center'>
|
||||
".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')."
|
||||
</div>
|
||||
</form>";
|
||||
}
|
||||
|
||||
// Admin : rss import
|
||||
if(!isset($RSS_ADMIN_IMPORT_HEADER))
|
||||
{
|
||||
$RSS_ADMIN_IMPORT_HEADER = "
|
||||
<form action='".e_SELF."' id='imlistform' method='post' >
|
||||
<table class='table adminform'>
|
||||
<tr>
|
||||
<th>".RSS_LAN_ADMIN_16."</td>
|
||||
<th>".LAN_PLUGIN_FOLDER."</td>
|
||||
<th>".LAN_NAME."</td>
|
||||
<th>".LAN_URL."</td>
|
||||
<th>".RSS_LAN_ADMIN_12."</td>
|
||||
</tr>";
|
||||
}
|
||||
if(!isset($RSS_ADMIN_IMPORT_TABLE))
|
||||
{
|
||||
$RSS_ADMIN_IMPORT_TABLE = "
|
||||
<tr>
|
||||
<td>{RSS_ADMIN_IMPORT_CHECK}</td>
|
||||
<td>{RSS_ADMIN_IMPORT_PATH}</td>
|
||||
<td><b>{RSS_ADMIN_IMPORT_NAME}</b><br />{RSS_ADMIN_IMPORT_TEXT}</td>
|
||||
<td>{RSS_ADMIN_IMPORT_URL}</td>
|
||||
<td>{RSS_ADMIN_IMPORT_TOPICID}</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if(!isset($RSS_ADMIN_IMPORT_FOOTER))
|
||||
{
|
||||
$RSS_ADMIN_IMPORT_FOOTER = "
|
||||
</table>
|
||||
<div class='buttons-bar center'>
|
||||
".$frm->admin_button('import_rss',RSS_LAN_ADMIN_17,'submit')."
|
||||
</div>
|
||||
</form>
|
||||
";
|
||||
}
|
||||
|
||||
// Listing
|
||||
if(e_QUERY)
|
||||
{
|
||||
$qs = explode(".", e_QUERY);
|
||||
}
|
||||
$action = varset($qs[0],'list');
|
||||
$field = varset($qs[1], '');
|
||||
$feedID = intval(varset($qs[2], 0));
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'create' :
|
||||
if ($_POST)
|
||||
{ // List
|
||||
$rss -> rssadminlist();
|
||||
}
|
||||
else
|
||||
{ // Create
|
||||
$rss -> rssadmincreate($field, $feedID);
|
||||
}
|
||||
break;
|
||||
case 'import' :
|
||||
$rss -> rssadminimport();
|
||||
break;
|
||||
case 'options' :
|
||||
$rss -> rssadminoptions();
|
||||
break;
|
||||
case 'r3' :
|
||||
$rss->show_message('', RSS_LAN_ADMIN_31); // Intentionally fall straight through after showing message
|
||||
case 'list' :
|
||||
default :
|
||||
$rss -> rssadminlist();
|
||||
}
|
||||
|
||||
require_once(e_ADMIN."footer.php");
|
||||
|
||||
// ##### Display options --------------------------------------------------------------------------
|
||||
function admin_prefs_adminmenu()
|
||||
{
|
||||
global $sql;
|
||||
$qs = explode(".",e_QUERY);
|
||||
|
||||
$act = varset($qs[0], 'list');
|
||||
|
||||
$var['list']['text'] = RSS_LAN_ADMINMENU_2;
|
||||
$var['list']['link'] = e_SELF."?list";
|
||||
|
||||
$var['create']['text'] = LAN_CREATE;
|
||||
$var['create']['link'] = e_SELF."?create";
|
||||
|
||||
$var['import']['text'] = RSS_LAN_ADMINMENU_4;
|
||||
$var['import']['link'] = e_SELF."?import";
|
||||
|
||||
$var['options']['text'] = LAN_OPTIONS;
|
||||
$var['options']['link'] = e_SELF."?options";
|
||||
|
||||
show_admin_menu(RSS_LAN_ADMINMENU_1, $act, $var);
|
||||
|
||||
}
|
||||
// ##### End --------------------------------------------------------------------------------------
|
||||
|
||||
class rss
|
||||
{
|
||||
// Check for config
|
||||
function file_check()
|
||||
{
|
||||
$arrays = file_get_contents(e_BASE."e107_config.php");
|
||||
$arrays2 = file_get_contents(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php");
|
||||
if($arrays[0] != "<" || $arrays2[0] != "<")
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Admin : list : existing rss feeds
|
||||
function rssadminlist()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$mes = e107::getMessage();
|
||||
$ns = e107::getRender();
|
||||
$sql = e107::getDb();
|
||||
|
||||
global $field, $sort, $rss_shortcodes, $row, $RSS_ADMIN_LIST_HEADER, $RSS_ADMIN_LIST_TABLE, $RSS_ADMIN_LIST_FOOTER;
|
||||
|
||||
$fieldstag = array('id'=>'rss_id','path'=>'rss_path','name'=>'rss_name','url'=>'rss_url','limit'=>'rss_limit');
|
||||
$order = (isset($fieldstag[$field])) ? "ORDER BY ".$fieldstag[$field]." ".$sort : "ORDER BY rss_id";
|
||||
|
||||
$query = "SELECT * FROM #rss ".$order;
|
||||
if(!$sql->db_Select_gen($query))
|
||||
{
|
||||
$this->show_message(LAN_ERROR, RSS_LAN_ERROR_3);
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = $tp -> parseTemplate($RSS_ADMIN_LIST_HEADER, FALSE, $rss_shortcodes);
|
||||
while($row=$sql->db_Fetch())
|
||||
{
|
||||
$text .= $tp -> parseTemplate($RSS_ADMIN_LIST_TABLE, FALSE, $rss_shortcodes);
|
||||
}
|
||||
$text .= $tp -> parseTemplate($RSS_ADMIN_LIST_FOOTER, FALSE, $rss_shortcodes);
|
||||
$ns->tablerender(RSS_LAN_ADMIN_1,$mes->render(). $text);
|
||||
}
|
||||
}
|
||||
|
||||
// Create or edit - put up a form
|
||||
function rssadmincreate($action, $id=0)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$ns = e107::getRender();
|
||||
$tp = e107::getParser();
|
||||
$sql = e107::getDb();
|
||||
|
||||
global $rss_shortcodes, $row, $RSS_ADMIN_CREATE_TABLE;
|
||||
|
||||
if (($action == "edit") && $id )
|
||||
{
|
||||
if(!$sql -> db_Select("rss", "*", "rss_id=".$id))
|
||||
{
|
||||
$this->show_message(LAN_ERROR, RSS_LAN_ERROR_5);
|
||||
}
|
||||
else
|
||||
{
|
||||
$row = $sql -> db_Fetch();
|
||||
$row['rss_name'] = $tp -> toForm($row['rss_name']);
|
||||
$row['rss_path'] = $tp -> toForm($row['rss_path']);
|
||||
$row['rss_url'] = $tp -> toForm($row['rss_url']);
|
||||
$row['rss_text'] = $tp -> toForm($row['rss_text']);
|
||||
}
|
||||
}
|
||||
|
||||
$text = $tp->parseTemplate($RSS_ADMIN_CREATE_TABLE, FALSE, $rss_shortcodes);
|
||||
|
||||
$ns->tablerender(RSS_LAN_ADMIN_10, $mes->render().$text);
|
||||
}
|
||||
|
||||
// Import - put up the list of possible feeds to import
|
||||
function rssadminimport()
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$ns = e107::getRender();
|
||||
$mes = e107::getMessage();
|
||||
$tp = e107::getParser();
|
||||
|
||||
global $i,$rss_shortcodes, $feed, $pref;
|
||||
global $RSS_ADMIN_IMPORT_HEADER, $RSS_ADMIN_IMPORT_TABLE, $RSS_ADMIN_IMPORT_FOOTER;
|
||||
|
||||
$sqli = new db;
|
||||
$feedlist = array();
|
||||
|
||||
// News
|
||||
$feed['name'] = ADLAN_0;
|
||||
$feed['url'] = 'news'; // The identifier for the rss feed url
|
||||
$feed['topic_id'] = ''; // The topic_id, empty on default (to select a certain category)
|
||||
$feed['path'] = 'news'; // This is the plugin path location
|
||||
$feed['text'] = RSS_PLUGIN_LAN_7;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$feedlist[] = $feed;
|
||||
|
||||
// News categories
|
||||
if($sqli -> db_Select("news_category", "*","category_id!='' ORDER BY category_name "))
|
||||
{
|
||||
while($rowi = $sqli -> db_Fetch())
|
||||
{
|
||||
$feed['name'] = ADLAN_0.' > '.$rowi['category_name'];
|
||||
$feed['url'] = 'news';
|
||||
$feed['topic_id'] = $rowi['category_id'];
|
||||
$feed['path'] = 'news';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_10.' '.$rowi['category_name'];
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
// $feed['exclude_class'] = '';
|
||||
$feedlist[] = $feed;
|
||||
}
|
||||
}
|
||||
|
||||
/* // Download
|
||||
$feed['name'] = ADLAN_24;
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = '';
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_8;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$feedlist[] = $feed;
|
||||
|
||||
// Download categories
|
||||
if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
|
||||
{
|
||||
while($rowi = $sqli -> db_Fetch())
|
||||
{
|
||||
$feed['name'] = ADLAN_24.' > '.$rowi['download_category_name'];
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = $rowi['download_category_id'];
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_11.' '.$rowi['download_category_name'];
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$feedlist[] = $feed;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/* // Comments
|
||||
$feed['name'] = LAN_COMMENTS;
|
||||
$feed['url'] = 'comments';
|
||||
$feed['topic_id'] = '';
|
||||
$feed['path'] = 'comments';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_9;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$feedlist[] = $feed;
|
||||
|
||||
// Plugin rss feed, using e_rss.php in plugin folder
|
||||
$plugin_feedlist = array();
|
||||
foreach($pref['e_rss_list'] as $val)
|
||||
{
|
||||
$eplug_rss_feed = array();
|
||||
if (is_readable(e_PLUGIN.$val."/e_rss.php"))
|
||||
{
|
||||
require_once(e_PLUGIN.$val."/e_rss.php");
|
||||
|
||||
$className = $val."_rss";
|
||||
$data = false;
|
||||
|
||||
if(!$data = e107::callMethod($className,'config'))
|
||||
{
|
||||
$data = $eplug_rss_feed;
|
||||
}
|
||||
|
||||
foreach($data as $v)
|
||||
{
|
||||
$v['path'] = $val;
|
||||
array_push($plugin_feedlist,$v);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$feedlist = array_merge($feedlist, $plugin_feedlist);
|
||||
|
||||
// print_a($feedlist);
|
||||
|
||||
$render=FALSE;
|
||||
$i=0;
|
||||
$text = $RSS_ADMIN_IMPORT_HEADER;
|
||||
foreach($feedlist as $k=>$feed)
|
||||
{
|
||||
$feed['topic_id'] = $tp -> toDB($feed['topic_id']);
|
||||
$feed['url'] = $tp -> toDB($feed['url']);
|
||||
|
||||
// Check if feed is not yet present
|
||||
if(!$sql->select("rss", "*", "rss_path='".$feed['path']."' AND rss_url='".$feed['url']."' AND rss_topicid='".$feed['topic_id']."' "))
|
||||
{
|
||||
$render=TRUE;
|
||||
$text .= $tp -> parseTemplate($RSS_ADMIN_IMPORT_TABLE, FALSE, $rss_shortcodes);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$text .= $tp -> parseTemplate($RSS_ADMIN_IMPORT_FOOTER, FALSE, $rss_shortcodes);
|
||||
|
||||
if(!$render)
|
||||
{
|
||||
$this->show_message(RSS_LAN_ADMIN_11, LAN_DESCRIPTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ns->tablerender(RSS_LAN_ADMIN_11, $mes->render(). $text);
|
||||
}
|
||||
}
|
||||
|
||||
// Options - display form
|
||||
function rssadminoptions()
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
$ns = e107::getRender();
|
||||
$tp = e107::getParser();
|
||||
|
||||
global $rss_shortcodes, $row, $RSS_ADMIN_OPTIONS_TABLE;
|
||||
|
||||
$text = $tp -> parseTemplate($RSS_ADMIN_OPTIONS_TABLE, FALSE, $rss_shortcodes);
|
||||
$ns->tablerender(LAN_OPTIONS, $mes->render(). $text);
|
||||
return;
|
||||
}
|
||||
|
||||
// Render message
|
||||
function show_message($caption='', $text='')
|
||||
{
|
||||
global $ns;
|
||||
$ns -> tablerender($caption, "<div style='text-align:center'><b>$text</b></div>");
|
||||
}
|
||||
|
||||
// Db:create/update
|
||||
function dbrss($mode='create')
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
$tp = e107::getParser();
|
||||
$cache = e107::getCache();
|
||||
$log = e107::getLog();
|
||||
|
||||
|
||||
if($_POST['rss_name'] && $_POST['rss_url'] && $_POST['rss_path'])
|
||||
{
|
||||
$rssVals = array();
|
||||
$rssVals['rss_name'] = $tp -> toDB(trim($_POST['rss_name']));
|
||||
$rssVals['rss_url'] = $tp -> toDB($_POST['rss_url']);
|
||||
$rssVals['rss_topicid'] = $tp -> toDB($_POST['rss_topicid']);
|
||||
$rssVals['rss_path'] = $tp -> toDB($_POST['rss_path']);
|
||||
$rssVals['rss_text'] = $tp -> toDB($_POST['rss_text']);
|
||||
$rssVals['rss_class'] = (intval($_POST['rss_class']) ? intval($_POST['rss_class']) : '0');
|
||||
$rssVals['rss_limit'] = intval($_POST['rss_limit']);
|
||||
// $rssVals['rss_exclude_class'] = intval($_POST['rss_exclude_class']);
|
||||
$rssVals['rss_datestamp'] = !empty($_POST['rss_datestamp']) ? (int) $_POST['rss_datestamp'] : time();
|
||||
$rssVals['WHERE'] = " rss_id = ".intval($_POST['rss_id']);
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'create' :
|
||||
$message = ($sql ->insert('rss',$rssVals)) ? LAN_CREATED : LAN_CREATED_FAILED;
|
||||
$log->logArrayAll('RSS_02',$rssVals, $message);
|
||||
$cache->clear('rss');
|
||||
break;
|
||||
|
||||
case 'update' :
|
||||
$message = ($sql ->update('rss', $rssVals)) ? LAN_UPDATED : LAN_UPDATED_FAILED;
|
||||
$log->logArrayAll('RSS_03',$rssVals, $message);
|
||||
$cache->clear('rss');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = RSS_LAN_ERROR_7;
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
// Import rss feeds
|
||||
function dbrssimport()
|
||||
{
|
||||
global $sql, $tp, $admin_log;
|
||||
|
||||
foreach($_POST['importid'] as $key=>$value)
|
||||
{
|
||||
$rssVals = array();
|
||||
$rssVals['rss_topicid'] = $tp -> toDB(varset($_POST['topic_id'][$key], ''));
|
||||
$rssVals['rss_url'] = $tp -> toDB(varset($_POST['url'][$key], ''));
|
||||
$rssVals['rss_path'] = $tp -> toDB(varset($_POST['path'][$key], ''));
|
||||
$rssVals['rss_name'] = $tp -> toDB(varset($_POST['name'][$key], ''));
|
||||
$rssVals['rss_text'] = $tp -> toDB(varset($_POST['text'][$key], ''));
|
||||
$rssVals['rss_datestamp'] = time();
|
||||
$rssVals['rss_class'] = intval(varset($_POST['class'][$key], '0'));
|
||||
$rssVals['rss_limit'] = intval(varset($_POST['limit'][$key], '0'));
|
||||
|
||||
$sql -> db_Insert("rss", $rssVals);
|
||||
$admin_log->logArrayAll('RSS_04',$rssVals);
|
||||
}
|
||||
$message = count($_POST['importid'])." ".RSS_LAN_ADMIN_18;
|
||||
return $message;
|
||||
}
|
||||
|
||||
function dbrsslimit()
|
||||
{
|
||||
global $sql, $tp, $admin_log;
|
||||
|
||||
$limitVals = array();
|
||||
foreach($_POST['limit'] as $key=>$value)
|
||||
{
|
||||
$key = intval($key);
|
||||
$value = intval($value);
|
||||
$limitVals[$key] = $value;
|
||||
$sql -> db_Update("rss", "rss_limit = ".$value." WHERE rss_id = ".$key);
|
||||
}
|
||||
$admin_log->logArrayAll('RSS_05',$limitVals);
|
||||
header("location:".e_SELF."?r3");
|
||||
}
|
||||
|
||||
// Update options
|
||||
function dboptions()
|
||||
{
|
||||
global $tp, $pref;
|
||||
|
||||
$admin_log = e107::getLog();
|
||||
|
||||
$temp = array();
|
||||
$temp['rss_othernews'] = $_POST['rss_othernews'];
|
||||
$temp['rss_summarydiz'] = $_POST['rss_summarydiz'];
|
||||
$temp['rss_shownewsimage'] = $_POST['rss_shownewsimage'];
|
||||
if ($admin_log->logArrayDiffs($temp, $pref, 'RSS_06'))
|
||||
{
|
||||
save_prefs(); // Only save if changes
|
||||
return LAN_SAVED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return LAN_NOCHANGE_NOTSAVED;
|
||||
}
|
||||
}
|
||||
} // End class rss
|
||||
?>*/
|
57
rate.php
57
rate.php
@ -26,9 +26,9 @@ if(!e_AJAX_REQUEST) // Legacy method.
|
||||
}
|
||||
|
||||
$table = $tp -> toDB($qs[0]);
|
||||
$itemid = intval($qs[1]);
|
||||
$itemid = (int) $qs[1];
|
||||
$returnurl = $tp -> toDB($qs[2]);
|
||||
$rate = intval($qs[3]);
|
||||
$rate = (int) $qs[3];
|
||||
e107::getRate()->submitVote($table,$itemid,$rate);
|
||||
header("location:".$returnurl);
|
||||
exit;
|
||||
@ -37,7 +37,7 @@ else // Ajax Used.
|
||||
{
|
||||
if($_POST['mode'] == 'thumb')
|
||||
{
|
||||
if(vartrue($_GET['type']) !='up' && vartrue($_GET['type']) !='down')
|
||||
if(vartrue($_GET['type']) !== 'up' && vartrue($_GET['type']) !== 'down')
|
||||
{
|
||||
exit;
|
||||
}
|
||||
@ -68,54 +68,3 @@ else // Ajax Used.
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if ($sql -> db_Select("rate", "*", "rate_table='{$table}' AND rate_itemid='{$itemid}'"))
|
||||
{
|
||||
$row = $sql -> db_Fetch();
|
||||
if(strpos($row['rate_voters'], ".".USERID.".") === FALSE)
|
||||
{
|
||||
$rate_voters = $row['rate_voters'].".".USERID.".";
|
||||
$new_rating = $row['rate_rating']+$rate;
|
||||
$sql -> db_Update("rate", "rate_votes=rate_votes+1, rate_rating='{$new_rating}', rate_voters='{$rate_voters}' WHERE rate_id='{$row['rate_id']}' ");
|
||||
if(!$returnurl)
|
||||
{
|
||||
$voteStatus = e107::getRate()->renderVotes($rate_voters,($row['rate_votes'] +1));
|
||||
echo $voteStatus."|".RATELAN_3; // Thank you for your vote.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($returnurl)
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "You already voted!";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($sql->db_Insert("rate", " 0, '{$table}', '{$itemid}', '{$rate}', '1', '.".USERID.".' "))
|
||||
{
|
||||
if(!$returnurl)
|
||||
{
|
||||
echo RATELAN_3; // Thank you for your vote.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
||||
|
2
top.php
2
top.php
@ -153,7 +153,7 @@ if ($action == 'top')
|
||||
WHERE ue.user_plugin_forum_posts > 0
|
||||
ORDER BY ue.user_plugin_forum_posts DESC LIMIT {$from}, {$view}
|
||||
";
|
||||
// $top_forum_posters = $sql->db_Select("user", "*", "`user_forums` > 0 ORDER BY user_forums DESC LIMIT ".$from.", ".$view."");
|
||||
|
||||
$text = "
|
||||
<div>
|
||||
<table style='width:95%' class='table table-striped fborder'>
|
||||
|
@ -52,8 +52,7 @@ if ($action == 'exit')
|
||||
|
||||
if ($action == "comments")
|
||||
{
|
||||
//$sql->db_Select("user", "user_name", "user_id=".$id);
|
||||
//$row = $sql->db_Fetch();
|
||||
|
||||
if($id == e107::getUser()->getId())
|
||||
{
|
||||
$user_name = USERNAME;
|
||||
@ -70,11 +69,8 @@ if ($action == "comments")
|
||||
$sql2 = e107::getDb('sql2');
|
||||
if($user_name)
|
||||
{
|
||||
// $ccaption = UP_LAN_1.$user_name;
|
||||
$ccaption = str_replace('[x]', $user_name, UP_LAN_1);
|
||||
/*$sql->db_Select("user", "user_comments", "user_id=".$id);
|
||||
$row = $sql->db_Fetch();
|
||||
$ctotal = $row['user_comments'];*/
|
||||
|
||||
$ctotal = e107::getSystemUser($id, false)->getValue('comments', 0); // user_* getter shorthand
|
||||
$data = $cobj->getCommentData(10, $from, 'comment_author_id ='.$id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user