Beispiel #1
0
Assign('style_dir', LAYOUT);
Assign('template_dir', TEMPLATEDIR);
Assign('template_url', TEMPLATEURL);
Assign('layout_dir', LAYOUT);
if (USE_PHOTO_TAGGING == true) {
    $Cbucket->addJS('jquery_plugs/jquery.cbtagger.js', 'view_item');
}
$Cbucket->addJS('jquery_plugs/jquery.Jcrop.js', 'edit_account');
$Cbucket->addJS('amplify/amplify.core.min.js');
$Cbucket->addJS('amplify/amplify.request.min.js');
$Cbucket->addJS('amplify/amplify.store.min.js');
$Cbucket->addJS('amplify_requests.js');
//Assigning JS Files
Assign('jsArray', $Cbucket->JSArray);
//Assigning Module Files
Assign('module_list', $Cbucket->moduleList);
//Checking Website is closed or not
if (config('closed') && THIS_PAGE != 'ajax' && !$in_bg_cron && THIS_PAGE != 'cb_install') {
    if (!has_access("admin_access", TRUE)) {
        e($row['closed_msg'], "w");
        template("global_header.html");
        template("message.html");
        exit;
    } else {
        e(lang("ATTENTION: THIS WEBSITE IS IN OFFLINE MODE"), "w");
    }
}
//Configuring Uploader
uploaderDetails();
register_filter('photo_action_links', 'cbphoto_pm_action_link_filter');
attach_photo_pm_handlers();
Beispiel #2
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號098 綁定手機號 ##參考015和096
//
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
if (CheckOpenID($params['openid'], $params['uid']) == FALSE) {
    $result['msg'] = '电话号码已注册!';
} else {
    $fields = array('username_d' => Assign($params[KEY_PHONE]), 'password' => Assign($params['pwd']));
    $num = StorageEditByID('hh_techuser', $fields, $params['uid']);
    if ($num <= 0) {
        $result['msg'] = '绑定失败!';
    } else {
        $result = array('code' => '101', 'msg' => '绑定成功!');
    }
}
Beispiel #3
0
    $total = count($_POST['check_photo']);
    for ($i = 0; $i < $total; $i++) {
        $id_array[] = $_POST['check_photo'][$i];
    }
    //$eh->flush();
}
if (isset($_GET['search'])) {
    $array = array('title' => $_GET['title'], 'pid' => $_GET['photoid'], 'key' => $_GET['photokey'], 'tags' => $_GET['tags'], 'featured' => $_GET['featured'], 'active' => $_GET['active'], 'user' => $_GET['userid'], 'extension' => $_GET['extension'], 'order' => $_GET['order']);
}
$parr = $array;
// Creating Limit
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
$parr['limit'] = $get_limit;
if (!$parr['order']) {
    $parr['order'] = " date_added DESC ";
} else {
    $parr['order'] = $parr['order'] . " DESC";
}
$collections = $cbcollection->get_collections(array("type" => "photos"));
$photos = $cbphoto->get_photos($parr);
Assign('photos', $photos);
assign('c', $collections);
$pcount = $parr;
$pcount['count_only'] = true;
$total_rows = $cbphoto->get_photos($pcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
subtitle("Photo Manager");
template_files('photo_manager.html');
display_it();
Beispiel #4
0
            foreach ($condition['column'] as $key => $val) {
                $buffer[$key] = Assign($row[$val], 0);
            }
            $filter_count = array('uid' => Assign($params['uid'], 0), 'tid' => Assign($params['tid'], 0), 'tag' => Assign($params['tag'], 0), 'type' => '1');
            if (StorageCount('hh_techuser_shoucang', $filter_count)) {
                $buffer['collect'] = '1';
            }
            if ($params['type'] == '3' and $buffer['collect'] == '0') {
                continue;
            }
            $filter_count['touid'] = 0;
            if (StorageCount('hh_techuser_dianzan', $filter_count)) {
                $buffer['mypraise'] = '1';
            }
            $filter_total = array('tid' => Assign($params['tid'], 0), 'tag' => Assign($params['tag'], 0), 'type' => '1', 'touid' => 0);
            $buffer['praises'] = StorageCount('hh_techuser_dianzan', $filter_total);
            ## 獲取圖片信息
            if ($params['tag'] == '1' or $params['tag'] == '2') {
                $buffer['mdata'] = array();
                $condition_sub = array('schema' => 'hh_techforum_img', 'fields' => array('id'), 'filter' => array('qid' => Assign($row['id'], 0)));
                $buf = StorageFind($condition_sub);
                if (is_array($buf) and empty($buf) == FALSE) {
                    foreach ($buf as $number => $row_img) {
                        $buffer['mdata'][] = array('mid' => $row_img['id'], 'type' => '0', 'mname' => 'image' . ($number + 1), 'mpic' => "{$row_img['id']}_s.png", 'url' => '');
                    }
                }
            }
            $result['data'][] = $buffer;
        }
    }
}
Beispiel #5
0
} else {
    $rankscore = Techuser_rank2score(Assign($params['reward'], 0));
    if (empty($rankscore) == FALSE) {
        $record_user = StorageFindID('hh_techuser', $params['uid']);
        if (is_array($record_user) == FALSE or empty($record_user) == TRUE) {
            $result['msg'] = '当前帐号不存在!';
        } else {
            if ($record_user['rankscore'] < $rankscore) {
                $result['msg'] = '您的可兑换积分余额不足!';
            } else {
                $result['msg'] = '';
            }
        }
    }
    if (empty($result['msg']) == TRUE or empty($params['reward']) == TRUE) {
        $data = array('pubuser' => Assign($params['uid'], 0), 'type' => Assign($params['tag'], 0), 'title' => Assign($params['title']), 'content' => Assign($params['context']), 'pubtime' => 'NOW()', 'anonymous' => Assign($params['anonymous'], 0), 'reward' => Assign($params['reward'], 0), 'rewarded' => empty($params['reward']) ? 0 : $rankscore);
        $id = StorageAdd('hh_techforum', $data);
        if (empty($id) == TRUE) {
            $result['msg'] = MESSAGE_ERROR;
        } else {
            for ($index = 0; $index < 6; $index++) {
                $field = 'image' . strval($index + 1);
                if ($_FILES[$field]['error'] <= 0 and empty($_FILES[$field]['tmp_name']) == FALSE) {
                    $buf_data = array('qid' => $id, 'createdat' => 'NOW()', 'filename' => $_FILES[$field]['name'], 'size' => $_FILES[$field]['size']);
                    $buf_id = StorageAdd('hh_techforum_img', $buf_data);
                    $uploadfile = PIC_F_PATH . DIRECTORY_SEPARATOR . "{$buf_id}.png";
                    $uploadfile_s = PIC_F_PATH . DIRECTORY_SEPARATOR . "{$buf_id}_s.png";
                    move_uploaded_file($_FILES[$field]['tmp_name'], $uploadfile);
                    MakeSmallIMG($uploadfile, $uploadfile_s);
                }
            }
Beispiel #6
0
//Deleting Multiple Videos
if (isset($_POST['delete_flags'])) {
    for ($id = 0; $id <= RESULTS; $id++) {
        $eh->flush();
        $cbvid->action->delete_flags($_POST['check_video'][$id]);
    }
}
switch ($mode) {
    case "view":
    default:
        assign("mode", "view");
        //Getting Video List
        $page = mysql_clean($_GET['page']);
        $get_limit = create_query_limit($page, 5);
        $videos = $cbvid->action->get_flagged_objects($get_limit);
        Assign('videos', $videos);
        //Collecting Data for Pagination
        $total_rows = $cbvid->action->count_flagged_objects();
        $total_pages = count_pages($total_rows, 5);
        //Pagination
        $pages->paginate($total_pages, $page);
        break;
    case "view_flags":
        assign("mode", "view_flags");
        $vid = mysql_clean($_GET['vid']);
        $vdetails = $cbvid->get_video($vid);
        if ($vdetails) {
            $flags = $cbvid->action->get_flags($vid);
            assign('flags', $flags);
            assign('video', $vdetails);
        } else {
Beispiel #7
0
    case '1':
        $condition = array('schema' => 'hh_techuser', 'filter' => array('username_d' => Assign($params['phone'])));
        if (empty($params['phoneaes']) == FALSE) {
            $condition['filter']['username'] = Assign($params['phoneaes']);
        }
        $record = StorageFindOne($condition);
        if (is_array($record) and empty($record) == FALSE) {
            $result['msg'] = '该号码已经被注册!';
            die(JsonEncode($result));
        }
        $params['message'] = SMS_ACTION_BANDINGS . $chars;
        break;
    case '2':
        $condition = array('schema' => 'hh_techuser', 'filter' => array('username_d' => Assign($params['phone'])));
        if (empty($params['phoneaes']) == FALSE) {
            $condition['filter']['username'] = Assign($params['phoneaes']);
        }
        $record = StorageFindOne($condition);
        if (is_array($record) == FALSE or empty($record) == TRUE) {
            $result['msg'] = '该号码不存在!';
            die(JsonEncode($result));
        }
        $params['message'] = SMS_ACTION_PASSWORD . $chars;
        break;
}
## 發送短信
if (SMS($params['phone'], $params['message']) == FALSE) {
    $result['msg'] = '发送失败!';
    die(JsonEncode($result));
}
$result = array('code' => '101', 'data' => $chars);
Beispiel #8
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號087 推薦APP
//
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
$condition = array('schema' => 'hh_dbver', 'fields' => array('COUNT(*)', 'ver'), 'filter' => array('vername' => 'app_' . Assign($params['tag']), 'ver' => array('GT', Assign($params['databasever'], 0))));
$recordset = StorageFind($condition);
if (is_array($recordset) == FALSE or empty($recordset) == TRUE) {
    $result['msg'] = MESSAGE_EMPTY;
} else {
    $result = array('code' => '101', 'data' => array(), 'messages' => 0);
    if (empty($recordset) == FALSE) {
        $result['databasever'] = $recordset[0]['ver'];
    }
    $condition_sub = array('schema' => 'hh_app', 'fields' => array('id', 'title', 'url', 'img'), 'filter' => array('tag' => array('NEQ', $params['tag'])));
    $buf = StorageFind($condition_sub);
    if (is_array($buf) and empty($buf) == FALSE) {
        foreach ($buf as $index => $row) {
            $result['data'][] = array('aid' => $row['id'], 'aname' => $row['title'], 'url' => $row['url'], 'imageurl' => $row['img']);
            $result['messages'] += 1;
        }
    }
}
//Create package
if (isset($_GET['create_package'])) {
    if ($lang_obj->createPack($_GET['create_package'])) {
        e("Language pack has been re-created", "m");
    }
}
//Create package
if (isset($_GET['recreate_from_pack'])) {
    if ($lang_obj->updateFromPack($_GET['recreate_from_pack'])) {
        e("Language database has been updated", "m");
    }
}
//Get List Of Languages
assign('language_list', $lang_obj->get_langs());
Assign('msg', $msg);
if ($lang_obj->lang_exists(mysql_clean($_GET['edit_language']))) {
    assign('edit_lang', 'yes');
    assign('lang_details', $lang_obj->lang_exists(mysql_clean($_GET['edit_language'])));
    $edit_id = mysql_clean($_GET['edit_language']);
    $limit = RESULTS;
    $current_page = $_GET['page'];
    $current_page = is_numeric($current_page) && $current_page > 0 ? $current_page : 1;
    $curr_limit = ($current_page - 1) * $limit . ',' . $limit;
    if (isset($_GET['search_phrase'])) {
        $varname = mysql_clean($_GET['varname']);
        $text = mysql_clean($_GET['text']);
        if (!empty($varname)) {
            $varname_query = "varname LIKE '%{$varname}%'";
        }
        if (!empty($text)) {
Beispiel #10
0
    }
}
//Set Mode
assign('mode', $_GET['mode']);
if (isset($_POST['update'])) {
    $configs = $Cbucket->configs;
    $rows = array('autoplay_video', 'buffer_time', 'logo_placement', 'use_playlist', 'youtube_enabled', 'enlarge_button', 'embed_player_height', 'embed_player_width', 'autoplay_embed', 'pseudostreaming', 'pak_license', 'pakplayer_contextmsg');
    //Checking for logo
    if (isset($_FILES['logo_file']['name'])) {
        $logo_file = $Upload->upload_website_logo($_FILES['logo_file']);
        if ($logo_file) {
            $myquery->Set_Website_Details('player_logo_file', $logo_file);
        }
    }
    if ($_POST['pak_license'] && !file_exists(BASEDIR . '/player/pak_player/pakplayer.unlimited.swf')) {
        $_POST['pak_license'] = "";
    }
    foreach ($rows as $field) {
        $value = mysql_clean($_POST[$field]);
        $myquery->Set_Website_Details($field, $value);
    }
    e("Player Settings Have Been Updated", 'm');
}
if ($_GET['set']) {
    $cbplayer->set_player($_GET);
}
$row = $myquery->Get_Website_Details();
Assign('row', $row);
subtitle("Manage Players");
template_files('manage_players.html');
display_it();
Beispiel #11
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號007 申請訪問該問題
//
// @authors hjboss <*****@*****.**> 2015-12-16#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
if (CheckOpenID($params['openid'], $params['uid']) == FALSE) {
    $result['msg'] = MESSAGE_WARNING;
} else {
    $fields = array('lockby' => 0, 'locktime' => 'NOW()', 'zhuangtai' => 0);
    $filter = array('id' => Assign($params['qid'], 0), 'lockby' => Assign($params['uid'], 0), 'zhuangtai' => 1);
    $num = StorageEdit('hh_questions', $fields, $filter);
    if (empty($num) == TRUE) {
        $result['msg'] = '放弃失败!';
    } else {
        StorageEdit('hh_questions_list', array('zhuangtai' => 1), array('qid' => Assign($params['qid'], 0)));
        $result = array('code' => '101', 'msg' => MESSAGE_SUCCESS);
    }
}
Beispiel #12
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號107 獲取案例跟貼(服務器頁面Ajax專用)
//
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
header('Access-Control-Allow-Origin:*');
$result = array('code' => '101', 'data' => array());
$condition = array('schema' => 'hh_anli_thread', 'filter' => array('cid' => empty($_REQUEST['cid']) ? Assign($params['cid'], 0) : $_REQUEST['cid']), 'others' => 'ORDER BY id DESC', 'charset' => TRUE);
$recordset = StorageFind($condition);
if (is_array($recordset) and empty($recordset) == FALSE) {
    foreach ($recordset as $index => $row) {
        $record = StorageFindID('hh_techuser', $row['uid']);
        $content = $row['content'];
        if (empty($row['version']) == FALSE) {
            $content = Charset($content, DB_CHARSET, CL_CHARSET);
        }
        $result['data'][] = array('uid' => Assign($row['uid'], 0), 'nick' => Assign($record['nick'], NICK_DEFAULT), 'image' => empty($record['headerimg']) ? ICON_DEFAULT : ICON_PATH . $record['headerimg'], 'potimes' => $row['createdat'], 'context' => $content, 'cid' => $row['cid']);
    }
}
Beispiel #13
0
            }
            $child_ids[] = mysql_clean($category);
        }
    }
    $search->category = $child_ids;
}
$search->date_margin = mysql_clean($_GET['datemargin']);
$search->sort_by = mysql_clean($_GET['sort']);
$search->limit = create_query_limit($page, $search->results_per_page);
$results = $search->search();
//echo $db->db_query;
//Collecting Data for Pagination
$total_rows = $search->total_results;
$total_pages = count_pages($total_rows, $search->results_per_page);
//Pagination
$pages->paginate($total_pages, $page);
Assign('results', $results);
Assign('template_var', $search->template_var);
Assign('display_template', $search->display_template);
if (empty($search->key)) {
    Assign('search_type_title', $search->search_type[$type]['title']);
} else {
    Assign('search_type_title', sprintf(lang('searching_keyword_in_obj'), mysql_clean(get('query')), $search->search_type[$type]['title']));
}
if (mysql_clean(get('query'))) {
    subtitle($search->search_type[$type]['title'] . ' &raquo; ' . mysql_clean(get('query')));
}
//Displaying The Template
template_files('search.html');
display_it();
//pr($db);
Beispiel #14
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號062 匹配正時之獲取車型詳細信息 ##代替048
//
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
$condition = array('schema' => 'car_type_zhengshi', 'fields' => array('id', 'title'), 'flter' => array('oftype' => Assign($params['bid'], 0), 'type' => Assign($params['tid'], 0)));
$recordset = StorageFind($condition);
if (is_array($recordset) == FALSE or empty($recordset) == TRUE) {
    $result['msg'] = '没有新数据,或者出现错误!';
} else {
    $result = array('code' => '101', 'data' => array());
    foreach ($recordset as $index => $row) {
        $result['data'][] = array('id' => $row['id'], 'name' => $row['title']);
    }
}
Beispiel #15
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號075 提交案例評分
//
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
if (CheckOpenID($params['openid'], $params['uid']) == FALSE) {
    $result['msg'] = MESSAGE_WARNING;
} else {
    $data = array('ofuser' => Assign($params['uid'], 0), 'createdat' => 'NOW()', 'ofanli' => Assign($params['cid'], 0), 'score' => Assign($params['score'], 0));
    $id = StorageAdd('car_anli_score', $data);
    if (empty($id) == TRUE) {
        $result['msg'] = '重复保存!';
    } else {
        $avg = "(SELECT SUM(score)/COUNT(id) FROM car_anli_score WHERE ofanli='%d')";
        $fields = array('score_avg' => sprintf($avg, $params['cid']));
        StorageEditByID('search_result', $fields, $params['cid']);
        ## 更新用戶積分
        Techuser_setScore(Assign($params['uid'], 0), 5);
        $result = array('code' => '101', 'msg' => MESSAGE_SUCCESS);
    }
}
Beispiel #16
0
 ***************************************************************
*/
define("THIS_PAGE", 'myaccount');
define("PARENT_PAGE", 'home');
require 'includes/config.inc.php';
$userquery->logincheck();
subtitle(lang("my_account"));
assign('user', $userquery->get_user_details(userid()));
global $db, $cbvid;
$videos = $cbvid->get_videos(array("userid" => userid(), "order" => "date_added DESC", "limit" => 15));
assign('videos', $videos);
$result_array['limit'] = $get_limit;
$result_array['user'] = $udetails["userid"];
$get_limit = create_query_limit($page, 5);
$videos = $cbvid->action->get_flagged_objects($get_limit);
Assign('flagedVideos', $videos);
$result_array['limit'] = $get_limit;
$result_array['user'] = $udetails["userid"];
$get_limit = create_query_limit($page, 5);
$photos = $cbphoto->action->get_flagged_objects($get_limit);
assign('flagedPhotos', $photos);
if (isset($_GET['delete_video'])) {
    $video = mysql_clean($_GET['delete_video']);
    $cbvideo->delete_video($video);
}
template_files('myaccount.html');
display_it();
/*
define("THIS_PAGE",'myaccount');
define("PARENT_PAGE",'home');
require 'includes/config.inc.php';
if (!defined('MAIN_PAGE')) {
    define('MAIN_PAGE', 'Advertisement');
}
if (!defined('SUB_PAGE')) {
    define('SUB_PAGE', 'Manage Placements');
}
//Removing Placement
if (isset($_GET['remove'])) {
    $placement = mysql_clean($_GET['remove']);
    $msg = $ads_query->RemovePlacement($placement);
}
//Adding Placement
if (isset($_POST['AddPlacement'])) {
    $placement_name = mysql_clean($_POST['placement_name']);
    $placement_code = mysql_clean($_POST['placement_code']);
    $array = array($placement_name, $placement_code);
    $msg = $ads_query->AddPlacement($array);
}
//Getting List Of Placement
$sql = "SELECT * FROM " . tbl("ads_placements");
$ads_placements = db_select($sql);
$total_placements = $db->num_rows;
//Getting total Ads in each placement
for ($id = 0; $id <= $total_placements; $id++) {
    $ads_placements[$id]['total_ads'] = $adsObj->count_ads_in_placement($ads_placements[$id]['placement']);
}
Assign('ads_placements', $ads_placements);
//pr($ads_placements,true);
subtitle("Add Advertisment Placement");
template_files('ads_add_placements.html');
display_it();
Beispiel #18
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號001 用戶首次安裝軟件提交設備ID
//
// @authors hjboss <*****@*****.**> 2015-12-14#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
//var_dump(RefreshMsgByDianzan(89, 4, 0));die;
$record = array('deviceid' => Assign($params['deviceid']), 'type' => strtoupper(Assign($params['device'])), 'createdat' => 'NOW()');
if (StorageAdd('hh_device', $record)) {
    $result = array('code' => '101', 'msg' => MESSAGE_SUCCESS);
}
Beispiel #19
0
<?php

// Copyright 2015 The Haohaoxiuche Team Authors. All right reserved.
// Use of this source that is governed by a Apache-style
// license that can be found in the LICENSE file.
//
// 技術版API編號016 技師用戶登陸請求 ##已取消 新接口064
//
// @authors hjboss <*****@*****.**> 2015-12-17#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
$condition = array('schema' => 'hh_techuser', 'filter' => array('username_d' => Assign($params[KEY_PHONE])));
$record = StorageFindOne($condition);
if (is_array($record) == FALSE or empty($record) == TRUE) {
    $result['msg'] = '用户不存在!';
} else {
    $condition['filter']['password'] = Assign($params['pwd']);
    $record = StorageFindOne($condition);
    if (is_array($record) == FALSE or empty($record) == TRUE) {
        $result['msg'] = '密码不正确!';
    } else {
        $result = array('code' => '101', 'msg' => Assign($params[KEY_PHONE]), 'data' => array());
        $result['data'][] = array('uid' => $record['id'], 'openid' => $record['loginid'], 'image' => $record['headerimg'], 'nick' => $record['nick'], 'grade' => $record['grade'], 'score' => $record['score'], 'city' => $record['city'], 'cars' => $record['cars'], 'job' => $record['job'], 'level' => $record['level'], 'experience' => $record['experience']);
        Techuser_setScore($record['id'], 1);
    }
}
Beispiel #20
0
// @authors hjboss <*****@*****.**> 2015-12-18#
// @version 1.0.0
// @package hhxc
if (!defined('HHXC')) {
    die('Permission denied');
}
$message = array('赶紧参加实名认证,赢得加倍经验值!', '您的信息已经提交审核,结果在此发布,敬请关注。', '实名认证通过,我们一起进步成长!', '身份证信息有问题,请重新提交!', '证书有问题,请重新提交!');
$image_url = 'http://www.haohaoxiuche.com/hhxc-api/mobile/images';
if (CheckOpenID($params['openid'], $params['uid']) == FALSE) {
    $result['msg'] = MESSAGE_WARNING;
} else {
    $condition = array('schema' => 'hh_identification', 'fields' => '*', 'filter' => array('uid' => Assign($params['uid'], 0)));
    $record = StorageFindOne($condition);
    if (is_array($record) == FALSE or empty($record) == TRUE) {
        $result['msg'] = MESSAGE_EMPTY;
    } else {
        $result = array('code' => '101', 'data' => array());
        $images = 0;
        if (empty($record['fileid']) == FALSE) {
            $images += 1;
        }
        if (empty($record['filerz1']) == FALSE) {
            $images += 1;
        }
        if (empty($record['filerz2']) == FALSE) {
            $images += 1;
        }
        $result['msg'] = $message[$record['status'] - 1];
        $result['data'][] = array('identification' => $record['identification'], 'name' => $record['name'], 'states' => $record['status'], 'images' => $images, 'fileid' => Assign($record['fileid'], "{$image_url}/def_iden.png"), 'filerz1' => Assign($record['filerz1'], "{$image_url}/def_filerz1.png"), 'filerz2' => Assign($record['filerz2'], "{$image_url}/def_filerz2.png"));
    }
}
Beispiel #21
0
function JPushMessage($meessageno, $params, $schema)
{
    global $PUSH_MESSAGES;
    $jpush = array('message' => $PUSH_MESSAGES[$meessageno]);
    ## 獲取跟帖者信息
    $buffer_uid = StorageFindID('hh_techuser', Assign($params['uid'], 0));
    if (is_array($buffer_uid) and empty($buffer_uid) == FALSE) {
        $jpush['who'] = $buffer_uid;
    }
    ## 獲取發帖者信息
    if (empty($params['touid'])) {
        $buffer_tid = StorageFindID($schema, Assign($params['tid'], 0));
        if (is_array($buffer_tid) and empty($buffer_tid) == FALSE) {
            $jpush['title'] = $buffer_tid['title'];
            $key_pubuser = $params['tag'] == 4 ? 'ofuser' : 'pubuser';
            $buffer_user = StorageFindID('hh_techuser', $buffer_tid[$key_pubuser]);
            if (is_array($buffer_user) and empty($buffer_user) == FALSE) {
                $jpush['user'] = $buffer_user;
            }
        }
    } else {
        $buffer_tolistid = StorageFindID($schema . '_list', Assign($params['tolistid'], 0));
        if (is_array($buffer_tolistid) and empty($buffer_tolistid) == FALSE) {
            $jpush['title'] = $buffer_tolistid['title'];
            $jpush['user'] = StorageFindID('hh_techuser', Assign($params['touid'], 0));
        }
    }
    $jpush['params'] = array('type' => $meessageno);
    return JPushMessageByUser($jpush);
}
Beispiel #22
0
\t<th class="h-long"><strong>公司规模</strong>:</th>
\t<td colspan="3">{$record['scale']}</td>
</tr>
<tr>
\t<th class="h-long"><strong>联系方式</strong>:</th>
\t<td colspan="3">{$record['contactinfo']}</td>
</tr>
<tr>
\t<th class="h-long"><strong>福利待遇</strong>:</th>
\t<td colspan="3">{$record['boon']}</td>
</tr>
<tr>
\t<th class="h-long"><strong>公司名称</strong>:</th>
\t<td colspan="3">{$record['name']}</td>
</tr>
<tr>
\t<th class="h-long"><strong>公司地址</strong>:</th>
\t<td colspan="3">{$record['location']}</td>
</tr>
<tr>
\t<th class="h-long"><strong>其他信息</strong>:</th>
\t<td colspan="3">{$record['etc']}</td>
</tr>
</table>
EOD;
        break;
    default:
        $title = Assign($record['title'], 0);
        $content = str_replace('\\n', '<br />', Assign($record['content']));
}
include_once 'share_common.php';
Beispiel #23
0
}
//Calling Group Manager Functions
call_functions($cbgroup->group_manager_funcs);
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, RESULTS);
if (isset($_GET['search'])) {
    $array = array('group_id' => $_GET['group_id'], 'user' => $_GET['userid'], 'title' => $_GET['title'], 'tags' => $_GET['tags'], 'category' => $_GET['category'], 'featured' => $_GET['featured'], 'active' => $_GET['active']);
}
$result_array = $array;
//Getting Video List
$result_array['limit'] = $get_limit;
if (!$array['order']) {
    $result_array['order'] = " date_added DESC ";
}
$groups = $cbgroup->get_groups($result_array);
Assign('groups', $groups);
//Collecting Data for Pagination
$gcount = $array;
$gcount['count_only'] = true;
$total_rows = $cbgroup->get_groups($gcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
//Category Array
if (is_array($_GET['category'])) {
    $cats_array = array($_GET['category']);
} else {
    preg_match_all('/#([0-9]+)#/', $_GET['category'], $m);
    $cats_array = array($m[1]);
}
$cat_array = array(lang('vdo_cat'), 'type' => 'checkbox', 'name' => 'category[]', 'id' => 'category', 'value' => array('category', $cats_array), 'hint_1' => lang('vdo_cat_msg'), 'display_function' => 'convert_to_categories', 'category_type' => 'groups');
assign('cat_array', $cat_array);
Beispiel #24
0
        }
    }
    # Generating more thumbs
    if (isset($_GET['gen_more'])) {
        $num = config('num_thumbs');
        $dim = '503x283';
        $big_dim = config('big_thumb_width') . 'x' . config('big_thumb_height');
        require_once BASEDIR . '/includes/classes/sLog.php';
        $log = new SLog();
        $configs = array();
        require_once BASEDIR . '/includes/classes/conversion/ffmpeg.class.php';
        $ffmpeg = new FFMpeg($configs, $log);
        $ffmpeg->regenerateThumbs($vid_file, $data['file_directory'], $data['duration'], $dim, $num, $rand = NULL, $is_big = false, $data['file_name']);
        e(lang('Video thumbs has been regenrated successfully'), 'm');
        /*
        		  require_once(BASEDIR.'/includes/classes/conversion/ffmpeg.class.php');
          $ffmpeg = new FFMpeg();
        		  //Generating Thumbs
        		  $ffmpeg->generate_Thumbs($vid_file,$data['duration'],$dim,$num,$rand=NULL,$is_big=false);
                  //Generating Big Thumb
        		  $ffmpeg->generate_thumbs($vid_file,$data['duration'],$big_dim,$num,true,true);
        */
    }
    Assign('data', $data);
    Assign('rand', rand(44, 444));
} else {
    $msg[] = lang('class_vdo_del_err');
}
subtitle("Video Thumbs Manager");
template_files('upload_thumbs.html');
display_it();
Beispiel #25
0
        break;
    case "most_items":
        $cond['order'] = " total_objects DESC";
        break;
}
switch ($content) {
    case "videos":
        $cond['type'] = "videos";
        break;
    case "photos":
        $cond['type'] = "photos";
}
//$cond['has_items'] = true;
//Getting Collection List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, COLLPP);
$clist = $cond;
$clist['limit'] = $get_limit;
$collections = $cbcollection->get_collections($clist);
Assign('collections', $collections);
//Collecting Data for Pagination
$ccount = $cond;
$ccount['count_only'] = true;
$total_rows = $cbcollection->get_collections($ccount);
$total_pages = count_pages($total_rows, COLLPP);
//Pagination
$pages->paginate($total_pages, $page);
subtitle(lang('collections'));
//Displaying The Template
template_files('collections.html');
display_it();
Beispiel #26
0
        if (isset($_POST['update_level_perms'])) {
            $perm_array = $_POST;
            $userquery->update_user_level($lid, $perm_array);
        }
        //Getting Details of $level
        $levelDetails = $userquery->get_level_details($lid);
        Assign('level_details', $levelDetails);
        //GettinG Level Permission
        $level_perms = $userquery->get_level_permissions($lid);
        //pr($level_perms, true);
        $plugin_perms = $level_perms['plugins_perms'];
        $plugin_perms = json_decode($plugin_perms, true);
        assign('plugin_perms', $plugin_perms);
        Assign('level_perms', $level_perms);
        Assign('view', 'edit');
        break;
    case 'add':
        if (isset($_POST['add_new_level'])) {
            $array = $_POST;
            if ($userquery->add_user_level($array)) {
                redirect_to('user_levels.php?added=true');
            }
        }
        Assign('view', 'add');
}
//$lev = $userquery->get_level_types();
//$per = $userquery->get_permissions(2);
//pr($per, true);
subtitle("User levels");
template_files('user_levels.html');
display_it();
Beispiel #27
0
//Edit Categoty
if (isset($_GET['category'])) {
    assign("edit_category", "show");
    if (isset($_POST['update_category'])) {
        $userquery->thumb_dir = 'users';
        $userquery->update_category($_POST);
    }
    assign('cat_details', $userquery->get_category($_GET['category']));
}
//Delete Category
if (isset($_GET['delete_category'])) {
    $userquery->delete_category($_GET['delete_category']);
}
$cats = $userquery->get_categories();
//Updating Category Order
if (isset($_POST['update_order'])) {
    foreach ($cats as $cat) {
        if (!empty($cat['category_id'])) {
            $order = $_POST['category_order_' . $cat['category_id']];
            $userquery->update_cat_order($cat['category_id'], $order);
        }
    }
    $cats = $userquery->get_categories();
}
//Assing Category Values
assign('category', $cats);
assign('total', $userquery->total_categories());
Assign('msg', @$msg);
subtitle("User Category Manager");
template_files('user_category.html');
display_it();
Beispiel #28
0
} else {
    $dir = BASEDIR . '/' . TEMPLATEFOLDER . '/' . $_GET['temp'] . '/layout/';
    $cur_dir = $_GET['temp'];
}
if (!($dp = opendir($dir))) {
    die("Cannot open {$dir}.");
}
while ($file = readdir($dp)) {
    $ext = GetExt($file);
    if ($ext == 'html' || $ext == 'HTML') {
        $files[] = $file;
    }
}
closedir($dp);
sort($files);
Assign('files', $files);
//Writng File
if (isset($_POST['save'])) {
    $file = $dir . $_POST['file'];
    $data = stripslashes($_POST['data']);
    $open_file = fopen($file, "w");
    fwrite($open_file, $data);
    $msg = $_POST['file'] . " Has Been Saved And Updated";
}
//Getting Data from File
if (isset($_POST['file'])) {
    $file = $dir . $_POST['file'];
    $_file = $_POST['file'];
} else {
    $file = $dir . $files[0];
    $_file = $files[0];
Beispiel #29
0
        $u_cond['featured'] = "yes";
        break;
    case "top_rated":
        $u_cond['order'] = " rating DESC";
        break;
    case "most_commented":
        $u_cond['order'] = " total_comments DESC";
        break;
}
//Getting User List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, CLISTPP);
$count_query = $ulist = $u_cond;
$ulist['limit'] = $get_limit;
$users = get_users($ulist);
Assign('users', $users);
if ($_GET['cat']) {
    $category = $userquery->get_category_field(mysql_clean(get('cat')), 'category_name');
    assign('category', $category);
}
if ($_GET['sort']) {
    $vsort = mysql_clean(get('sort'));
    $vsort = str_replace('most_comment', 'comment', $vsort);
    $sort = lang($vsort);
    if ($sort != $vsort) {
        assign('sort', $vsort);
    } else {
        $sort = false;
    }
    if ($vsort == 'most_recent') {
        $sort = false;
Beispiel #30
0
 $total_pages = count_pages($counter, VLISTPP);
 //Pagination
 $link == NULL;
 $extra_params = NULL;
 $tag = '<li><a #params#>#page#</a><li>';
 $pages->paginate($total_pages, $page, $link, $extra_params, $tag);
 // pulls user profile
 $profile = $userquery->get_user_profile($udetails['userid']);
 Assign('u_control', $profile);
 // making sure user can see his private vid tab
 //$user_cond = $userquery->userid != $udetails['userid'];
 //Assign('u_cond', $user_cond);
 $firstVideo = isset($videos[0]) ? $videos[0] : false;
 $firstVideo = $cbvid->get_video($firstVideo['videoid']);
 //echo "hm";
 Assign('firstVideo', $firstVideo);
 //Checking Profile permissions
 $perms = $p['show_profile'];
 if (userid() != $udetails['userid']) {
     if (($perms == 'friends' || $perms == 'members') && !userid()) {
         e(lang('you_cant_view_profile'));
         if (!has_access('admin_access', true)) {
             $Cbucket->show_page = false;
         }
     } elseif ($perms == 'friends' && !$userquery->is_confirmed_friend($udetails['userid'], userid())) {
         e(sprintf(lang('only_friends_view_channel'), $udetails['username']));
         if (!has_access('admin_access', true)) {
             $Cbucket->show_page = false;
         }
     }
     //Checking if user is not banned by admin