updating includes
This commit is contained in:
parent
575740fc89
commit
bcf2ca1d62
7 changed files with 93 additions and 4 deletions
|
@ -107,6 +107,7 @@ class ADODB_mysql extends ADOConnection {
|
||||||
{
|
{
|
||||||
$total_fields = count($flds);
|
$total_fields = count($flds);
|
||||||
$count = 0;
|
$count = 0;
|
||||||
|
var_dump($total_fields);
|
||||||
for($i=0;$i<$total_fields;$i++)
|
for($i=0;$i<$total_fields;$i++)
|
||||||
{
|
{
|
||||||
$count++;
|
$count++;
|
||||||
|
@ -133,6 +134,7 @@ class ADODB_mysql extends ADOConnection {
|
||||||
}
|
}
|
||||||
//Complete Query
|
//Complete Query
|
||||||
$query = "UPDATE $tbl SET $fields_query WHERE $cond $ep";
|
$query = "UPDATE $tbl SET $fields_query WHERE $cond $ep";
|
||||||
|
|
||||||
//if(!mysql_query($query)) die($query.'<br>'.mysql_error());
|
//if(!mysql_query($query)) die($query.'<br>'.mysql_error());
|
||||||
$this->total_queries++;
|
$this->total_queries++;
|
||||||
$this->total_queries_sql[] = $query;
|
$this->total_queries_sql[] = $query;
|
||||||
|
@ -212,8 +214,7 @@ class ADODB_mysql extends ADOConnection {
|
||||||
$query_params .= " LIMIT $limit ";
|
$query_params .= " LIMIT $limit ";
|
||||||
|
|
||||||
$query = " SELECT $fields FROM $tbl $query_params $ep ";
|
$query = " SELECT $fields FROM $tbl $query_params $ep ";
|
||||||
|
//Finally Executing
|
||||||
//Finally Executing
|
|
||||||
$data = $this->Execute($query);
|
$data = $this->Execute($query);
|
||||||
$this->num_rows = $data->_numOfRows;
|
$this->num_rows = $data->_numOfRows;
|
||||||
$this->total_queries++;
|
$this->total_queries++;
|
||||||
|
|
|
@ -713,6 +713,7 @@ class ClipBucket
|
||||||
$_POST = $clean_posts;
|
$_POST = $clean_posts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Cleaning get..
|
//Cleaning get..
|
||||||
if (is_array($gets) && count($gets) > 0)
|
if (is_array($gets) && count($gets) > 0)
|
||||||
{
|
{
|
||||||
|
@ -742,6 +743,8 @@ class ClipBucket
|
||||||
}
|
}
|
||||||
$_REQUEST = $clean_request;
|
$_REQUEST = $clean_request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//dump($_POST);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -281,7 +281,6 @@ class pages{
|
||||||
$start_last = $i;
|
$start_last = $i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Starring Last
|
//Starring Last
|
||||||
for($i=$total_pages-$display_page;$i<=$total_pages;$i++)
|
for($i=$total_pages-$display_page;$i<=$total_pages;$i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1426,7 +1426,13 @@ class CBPhotos
|
||||||
|
|
||||||
$query_field[] = "date_added";
|
$query_field[] = "date_added";
|
||||||
$query_val[] = NOW();
|
$query_val[] = NOW();
|
||||||
|
|
||||||
|
/*$query_field[] = "file_directory";
|
||||||
|
$query_val[] = $array['file_directory'];*/
|
||||||
|
|
||||||
|
$query_field[] = "active";
|
||||||
|
$query_val[] = 'no';
|
||||||
|
|
||||||
$query_field[] = "owner_ip";
|
$query_field[] = "owner_ip";
|
||||||
$query_val[] = $_SERVER['REMOTE_ADDR'];
|
$query_val[] = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,10 @@ class Upload{
|
||||||
if(count($this->custom_form_fields)>0)
|
if(count($this->custom_form_fields)>0)
|
||||||
$upload_fields = array_merge($upload_fields,$this->custom_form_fields);
|
$upload_fields = array_merge($upload_fields,$this->custom_form_fields);
|
||||||
|
|
||||||
|
|
||||||
|
/*dump($array);
|
||||||
|
dump($upload_fields);
|
||||||
|
die();*/
|
||||||
validate_cb_form($upload_fields,$array);
|
validate_cb_form($upload_fields,$array);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -67,10 +71,13 @@ class Upload{
|
||||||
if(!$array)
|
if(!$array)
|
||||||
$array = $_POST;
|
$array = $_POST;
|
||||||
|
|
||||||
|
|
||||||
|
// $_POST['embed_code'] = htmlspecialchars($_POST['embed_code']);
|
||||||
$this->validate_video_upload_form($array,TRUE);
|
$this->validate_video_upload_form($array,TRUE);
|
||||||
|
|
||||||
if(empty($eh->error_list))
|
if(empty($eh->error_list))
|
||||||
{
|
{
|
||||||
|
|
||||||
$required_fields = $this->loadRequiredFields($array);
|
$required_fields = $this->loadRequiredFields($array);
|
||||||
$location_fields = $this->loadLocationFields($array);
|
$location_fields = $this->loadLocationFields($array);
|
||||||
$option_fields = $this->loadOptionFields($array);
|
$option_fields = $this->loadOptionFields($array);
|
||||||
|
|
|
@ -3344,7 +3344,7 @@ class userquery extends CBCategory{
|
||||||
|
|
||||||
// first checking if captha plugin is enabled
|
// first checking if captha plugin is enabled
|
||||||
// do not depend on the form cb_captcha_enabled value
|
// do not depend on the form cb_captcha_enabled value
|
||||||
if(get_captcha() && !$userquery->admin_login_check()){
|
if(get_captcha() && !$userquery->admin_login_check(true)){
|
||||||
//var_dump(get_captcha());
|
//var_dump(get_captcha());
|
||||||
//var_dump(!error());
|
//var_dump(!error());
|
||||||
//echo "<pre>";
|
//echo "<pre>";
|
||||||
|
|
|
@ -2195,6 +2195,79 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function increment_views_new($id,$type=NULL)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
switch($type)
|
||||||
|
{
|
||||||
|
case 'v':
|
||||||
|
case 'video':
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
if(!isset($_COOKIE['video_'.$id])){
|
||||||
|
$db->update(tbl("video_views"),array("views","video_id"),array("|f|views+1",NOW())," videoid='$id' OR videokey='$id'");
|
||||||
|
setcookie('video_'.$id,'watched',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'u':
|
||||||
|
case 'user':
|
||||||
|
case 'channel':
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!isset($_COOKIE['user_'.$id])){
|
||||||
|
$db->update(tbl("users"),array("profile_hits"),array("|f|profile_hits+1")," userid='$id'");
|
||||||
|
setcookie('user_'.$id,'watched',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
case 'topic':
|
||||||
|
|
||||||
|
{
|
||||||
|
if(!isset($_COOKIE['topic_'.$id])){
|
||||||
|
$db->update(tbl("group_topics"),array("total_views"),array("|f|total_views+1")," topic_id='$id'");
|
||||||
|
setcookie('topic_'.$id,'watched',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
break;
|
||||||
|
case 'g':
|
||||||
|
case 'group':
|
||||||
|
|
||||||
|
{
|
||||||
|
if(!isset($_COOKIE['group_'.$id])){
|
||||||
|
$db->update(tbl("groups"),array("total_views"),array("|f|total_views+1")," group_id='$id'");
|
||||||
|
setcookie('group_'.$id,'watched',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "c":
|
||||||
|
case "collect":
|
||||||
|
case "collection":
|
||||||
|
{
|
||||||
|
if(!isset($_COOKIE['collection_'.$id])){
|
||||||
|
$db->update(tbl("collections"),array("views"),array("|f|views+1")," collection_id = '$id'");
|
||||||
|
setcookie('collection_'.$id,'viewed',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "photos":
|
||||||
|
case "photo":
|
||||||
|
case "p":
|
||||||
|
{
|
||||||
|
if(!isset($_COOKIE['photo_'.$id]))
|
||||||
|
{
|
||||||
|
$db->update(tbl('photos'),array("views","last_viewed"),array("|f|views+1",NOW())," photo_id = '$id'");
|
||||||
|
setcookie('photo_'.$id,'viewed',time()+3600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue