This commit is contained in:
parent
55ec5d1353
commit
c9ffbfece1
8 changed files with 95 additions and 24 deletions
|
@ -61,6 +61,7 @@ class myquery {
|
|||
//mysql_query("UPDATE config SET value = '".$value."' WHERE name ='".$name."'");
|
||||
global $db,$Cbucket;
|
||||
$db->update(tbl("config"),array('value'),array($value)," name = '".$name."'");
|
||||
//echo $db->db_query."<br/><br/>";
|
||||
$Cbucket->configs = $Cbucket->get_configs();
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,6 @@ class cbsearch
|
|||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$ma_query = "";
|
||||
#Checking for columns
|
||||
if(!$this->use_match_method)
|
||||
|
|
|
@ -15,9 +15,21 @@ if(is_installed('editorspick'))
|
|||
{
|
||||
assign('editor_picks',get_ep_videos());
|
||||
}
|
||||
|
||||
//i love coding :)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Custom Top users query. Specially for sauditube.org
|
||||
* SELECT cb_video.userid,cb_video.views,cb_users.*, SUM(cb_video.views) AS total_views FROM cb_video,cb_users
|
||||
* WHERE cb_video.userid = cb_users.userid GROUP BY cb_users.userid
|
||||
|
||||
$result = $db->select(tbl('video,users'),tbl('video.userid,video.views,users.*').", SUM(".tbl('video.views').") AS total_views"
|
||||
,' '.tbl('video.userid').' = '.tbl('users.userid').' GROUP BY '.tbl('users.userid').'',10,' total_views DESC');
|
||||
if($db->num_rows > 0)
|
||||
assign('topusers',$result);
|
||||
*/
|
||||
|
||||
//Displaying The Template
|
||||
template_files('index.html');
|
||||
display_it();
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
function checkUncheckAll(theElement) {
|
||||
var theForm = theElement.form, z = 0;
|
||||
|
||||
for(z=0; z<theForm.length;z++){
|
||||
if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){
|
||||
theForm[z].checked = theElement.checked;
|
||||
|
|
|
@ -1085,22 +1085,26 @@ function ajax_add_collection(obj)
|
|||
});
|
||||
}
|
||||
|
||||
function updatePhotos(obj)
|
||||
{
|
||||
var ID = obj.form.id,
|
||||
Child = $("#"+ID).children().filter('div'),
|
||||
total = Child.length, eachObj, AjaxCall;
|
||||
for(i=0;i<total;i++)
|
||||
{
|
||||
alert(i)
|
||||
}
|
||||
}
|
||||
|
||||
/*function updatePhotos(obj)
|
||||
{
|
||||
var ID = obj.form.id,
|
||||
Child = $("#"+ID).children().filter('div'),
|
||||
eachObj, AjaxCall, saving = 1;
|
||||
total = Child.length, eachObj, AjaxCall;
|
||||
}*/
|
||||
|
||||
function callAjax(obj)
|
||||
{
|
||||
var getArray = updatePhotos(obj),
|
||||
TotalItems = getArray.length;
|
||||
alert(TotalItems);
|
||||
$.each(getArray,function(i,v) { alert(i+" "+v) })
|
||||
}
|
||||
|
||||
function updatePhotos(obj)
|
||||
{
|
||||
var ID = obj.form.id,
|
||||
Child = $("#"+ID).children().filter('div'),
|
||||
eachObj, AjaxCall, i = 0, ParamArray = new Array(Child.length);
|
||||
var err_count = 0;
|
||||
$.each(Child,function(index,elem){
|
||||
eachObj = $(elem);
|
||||
|
@ -1129,9 +1133,8 @@ function updatePhotos(obj)
|
|||
query += input.id+"="+input.value+"&";
|
||||
})
|
||||
query += "mode=ajaxPhotos";
|
||||
alert(query);
|
||||
/*
|
||||
AjaxCall =
|
||||
ParamArray[index] = query;
|
||||
/* AjaxCall =
|
||||
$.ajax
|
||||
({
|
||||
url: page,
|
||||
|
@ -1139,11 +1142,13 @@ function updatePhotos(obj)
|
|||
dataType: "text",
|
||||
data: query,
|
||||
cache: false,
|
||||
beforeSend: function() { $(obj).text("Saving "+saving+" out of "+ Child.length); $(obj).attr('disabled','disabled') },
|
||||
//complete : function() { alert("Request Completed") }
|
||||
beforeSend: function() { $(obj).html(loading_img+" Saving"); $(obj).attr('disabled','disabled') },
|
||||
complete : function() { $(obj).html(Child.length+" photos saved") },
|
||||
success: function(data) { $("#"+eachObj.attr('id')).hide() }
|
||||
});
|
||||
saving++;
|
||||
|
||||
*/
|
||||
})
|
||||
}*/
|
||||
|
||||
return ParamArray;
|
||||
}
|
51
upload/photo_upload.php
Normal file
51
upload/photo_upload.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/*
|
||||
*******************************************************************
|
||||
| Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved.
|
||||
| @ Author : ArslanHassan
|
||||
| @ Software : ClipBucket , © PHPBucket.com
|
||||
| @ Modified : June 14, 2009 by Arslan Hassan
|
||||
*******************************************************************
|
||||
*/
|
||||
|
||||
define("THIS_PAGE","photo_upload");
|
||||
define("PARENT_PAGE","photo_upload");
|
||||
|
||||
require 'includes/config.inc.php';
|
||||
$userquery->logincheck();
|
||||
subtitle(lang('photos_upload'));
|
||||
|
||||
assign('max_upload',MAX_PHOTO_UPLOAD);
|
||||
|
||||
if(isset($_POST['EnterInfo']))
|
||||
{
|
||||
assign('step',2);
|
||||
$datas = $_POST['photoIDS'];
|
||||
$moreData = explode(",",$datas);
|
||||
$details = array();
|
||||
|
||||
foreach($moreData as $key=>$data)
|
||||
{
|
||||
$data = str_replace(' ','',$data);
|
||||
$data = unserialize(base64_decode($data));
|
||||
$details[] = $data;
|
||||
}
|
||||
|
||||
assign('photos',$details);
|
||||
}
|
||||
|
||||
if(isset($_POST['update_photos']))
|
||||
{
|
||||
|
||||
//$newArray = $cbphoto->return_formatted_post($POST);
|
||||
//$cbphoto->update_multiple_photos($newArray);
|
||||
assign('step',2);
|
||||
}
|
||||
$collections = $cbphoto->collection->get_collections(array("type"=>"photos","user"=>userid()));
|
||||
assign('c',$collections);
|
||||
|
||||
subtitle(lang('photos_upload'));
|
||||
//Displaying The Template
|
||||
template_files('photo_upload.html');
|
||||
display_it();
|
||||
?>
|
|
@ -8,10 +8,12 @@
|
|||
*/
|
||||
require 'includes/config.inc.php';
|
||||
header("Content-Type: text/xml charset=utf-8");
|
||||
print('<?xml version="1.0" encoding="UTF-8"?>' . "\n");
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
||||
|
||||
$limit = 100;
|
||||
$videos = get_videos(array('limit'=>$limit,'active'=>'yes','order'=>'date_added DESC'));?>
|
||||
$videos = get_videos(array('limit'=>$limit,'active'=>'yes','order'=>'date_added DESC'));
|
||||
|
||||
?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
|
||||
<!-- by fjulio ( tangi @ clipbucket dev. ) -->
|
||||
<?php
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{/if}
|
||||
|
||||
{if $step == 2}
|
||||
<button class="LoadMoreButton moveR clearfix" onclick="updatePhotos(this);" type="button" name="update_photos" id="update_photos">Save All</button>
|
||||
<button class="LoadMoreButton moveR clearfix" onclick="callAjax(this);" type="button" name="update_photos" id="update_photos">Save All</button>
|
||||
|
||||
{section name=p_list loop=$photos}
|
||||
{assign var='reqFields' value=$cbphoto->load_required_forms($photos[p_list])}
|
||||
|
|
Loading…
Add table
Reference in a new issue