fixed: amin area issues

This commit is contained in:
sajjadcb 2014-05-06 13:38:27 +00:00
parent 18341ca761
commit b191129356
3 changed files with 16 additions and 6 deletions

View file

@ -406,10 +406,13 @@ class formObj
* @param label
*/
function getCats($type){
return $catArray = getCategoryList(array("type" => $type));
}
function createDropDown($field,$multi=FALSE)
{
global $LANG;
//First Checking if value is CATEGORY
if($field['value'][0]=='category')
{
@ -418,6 +421,7 @@ class formObj
//Generate Category list
$type = $field['type'] ? $field['type'] : 'video';
$catArray = getCategoryList(array("type"=>$field['category_type']));
foreach ($catArray as $cat)
{
$field['value'][$cat['category_id']] = $cat['category_name'];
@ -431,7 +435,6 @@ class formObj
$ddFieldStart = '<select name="'.$field_name.'" id="'.$field['id'].'" class="'.$field['class'].'">';
$arrayName = $this->rmBrackets($field['name']);
if(is_array($field['value']))
foreach($field['value'] as $key => $value)
{

View file

@ -143,7 +143,6 @@ class myquery {
{
global $db,$userquery,$LANG;
//first get comment details
$cdetails = $this->get_comment($cid);
$uid = user_id();
@ -157,7 +156,8 @@ class myquery {
{
foreach($replies as $reply)
{
$this->delete_comment($reply['comment_id'],$type,TRUE,$forceDelete);
//$this->delete_comment($reply['comment_id'],$type,TRUE,$forceDelete);
$db->Execute("DELETE FROM ".tbl("comments")." WHERE comment_id='{$reply['comment_id']}'");
}
}
$db->Execute("DELETE FROM ".tbl("comments")." WHERE comment_id='$cid'");
@ -944,6 +944,11 @@ class myquery {
global $db;
$db->insert(tbl('admin_todo'),array('todo,date_added,userid'),array($todo,now(),userid()));
}
function update_todo($todo, $todo_id){
global $db;
$db->update(tbl('admin_todo'),array('todo'),array($todo), "todo_id = {$todo_id}");
}
/**
*
* Function used to get todolist

View file

@ -3872,15 +3872,17 @@ class userquery extends CBCategory{
$cond .= " ".$params['cond']." ";
}
if(!$params['count_only'])
{
$fields = array(
'users' => get_user_fields(),
'profile' => array( 'rating', 'rated_by', 'voters', 'first_name', 'last_name' )
'profile' => array( 'rating', 'rated_by', 'voters', 'first_name', 'last_name' ),
);
$fields['users'][] = 'last_active';
$query = " SELECT ".tbl_fields( $fields )." FROM ".tbl( 'users' )." AS users ";
$query .= " LEFT JOIN ".table( 'user_profile', 'profile ' )." ON users.userid = profile.userid ";