/** * Function used to call display */ function display_it() { try { global $ClipBucket, $db; $dir = LAYOUT; foreach ($ClipBucket->template_files as $file) { if (file_exists(LAYOUT . '/' . $file['file']) || is_array($file)) { if (!$ClipBucket->show_page && $file['follow_show_page']) { } else { if (!is_array($file)) { $new_list[] = $file; } else { if (isset($file['folder']) && file_exists($file['folder'] . '/' . $file['file'])) { $new_list[] = $file['folder'] . '/' . $file['file']; } else { $new_list[] = $file['file']; } } } } } assign('template_files', $new_list); Template('body.html'); footer(); } catch (SmartyException $e) { show_cb_error($e); } }
/** * PLayer video in video-js player * @global boolean $pak_player * @param type $in * @return boolean */ function video_js($in) { //Assigning configs so we can easily use them in template.. assign('configs', $in); //get the file for video... $files = $in['files']; $video_files = array(); if ($files) { foreach ($files as $key => $file) { if ($key) { if ($key == 'flv' || $key == 'mp4' || $key == 'mobile') { $video_file = $file; break; } } if ($file['status'] == 's' && $file['is_original'] != 'yes') { $video_file = $file['file_path']; break; } } } assign('file', $video_file); assign('video_files', $video_files); $player = fetch(VIDEO_JS_DIR . '/player.html', false); return $player; }
function get_mob_video($params) { $vdo = $params['video']; $assign = $params['assign']; $vid_file = get_video_file($vdo, true, true); $vidfile = substr($vid_file, 0, strlen($vid_file) - 4) . '-m.mp4'; assign($assign, $vidfile); if ($vidfile) { return $vidfile; } }
function cb_player($in) { global $cb_player; $cb_player = true; $vdetails = $in['video']; //Checking for YT Referal if (function_exists('get_refer_url_from_embed_code')) { $ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code']))); $ytcode = $ref_details['ytcode']; } $files = $in['files']; if ($files) { foreach ($files as $key => $file) { if ($key == 'flv' || $key == 'mp4' || $key == 'mobile') { $video_file = $file; break; } if ($file['status'] == 's' && $file['is_original'] != 'yes') { $video_file = VIDEOS_URL . '/' . $file['file_directory'] . '/'; $video_file .= $file['file_name'] . $file['suffix'] . '.' . $file['ext']; break; } } } if ($video_file || $ytcode) { if ($ytcode) { assign('youtube', true); assign('ytcode', $ytcode); } if (!strstr($in['width'], "%")) { $in['width'] = $in['width'] . 'px'; } if (!strstr($in['height'], "%")) { $in['height'] = $in['height'] . 'px'; } if ($in['autoplay'] == 'yes' || $in['autoplay'] === true || $_COOKIE['auto_play_playlist'] && ($_GET['play_list'] || $_GET['playlist'])) { $in['autoplay'] = true; } else { $in['autoplay'] = false; } //Logo Placement assign('logo_placement', cb_player_logo_position()); assign('logo_margin', config('logo_padding')); //Setting Skin assign('cb_skin', 'glow/glow.xml'); assign('player_data', $in); assign('player_logo', website_logo()); assign('normal_vid_file', $video_file); assign("hq_vid_file", $hd_file); assign('vdata', $vdetails); $player = fetch(CB_PLAYER_DIR . '/cbplayer.html', false); return $player; } }
public function handle($request, \Closure $next) { //bus('menu', geter('menu.my')); assign('get', sc('Get')); assign('post', sc('Post')); assign('router', sc('Router')); // assign('v3',[ // 'routerv3'=>'v33', // ]); // Perform action return $next($request); }
function blog_publish_smarty($path, $file, $timestamp, $title, $tags, $body, $comments) { assign('path'); assign('file'); assign('date', date($GLOBALS['DATEFORMAT_POST'], $timestamp)); assign('title', input_sanitize_smarty($title)); assign('tags', input_sanitize_smarty($tags)); assign('body', input_sanitize_smarty($body)); assign('comments', $comments); global $smarty; file_put_contents("{$smarty->template_dir}/.posts{$path}/{$file}.html", $smarty->fetch("post.smarty"), LOCK_EX); }
/** * Function used to pars video from attachemtn */ function parse_and_attach_video($att) { global $cbvid; preg_match('/{v:(.*)}/', $att, $matches); $vkey = $matches[1]; if (!empty($vkey)) { assign('video', $cbvid->get_video_details($vkey)); assign('only_once', true); echo '<h3>Attached Video</h3>'; template('blocks/video.html'); } }
function is_logged_in() { if (isset($_SESSION['logged_in'])) { $DB = Mysql::init(); $data = $DB->select('*', ACCOUNT_DATABASE . '.account', "id='" . $_SESSION['user_data']['id'] . "'"); clear_site(); if (is_array($data)) { assign('user_data', $data); Session::write('user_data', $data); return true; } } return false; }
/** * Function used to display flash player for ClipBucket video */ function flashPlayer($param) { global $Cbucket, $swfobj; $param['player_div'] = $param['player_div'] ? $param['player_div'] : 'videoPlayer'; $key = $param['key']; $flv = $param['flv'] . '.flv'; $code = $param['code']; $flv_url = $file; $embed = $param['embed']; $code = $param['code']; $height = $param['height'] ? $param['height'] : config('player_height'); $width = $param['width'] ? $param['width'] : config('player_width'); $param['height'] = $height; $param['width'] = $width; $param['enlarge_button'] = config('enlarge_button'); $param['player_logo_url'] = config('player_logo_url'); //dump($code); if (!$param['autoplay']) { $param['autoplay'] = config('autoplay_video'); } assign('player_params', $param); if (count($Cbucket->actions_play_video) > 0) { foreach ($Cbucket->actions_play_video as $funcs) { if (function_exists($funcs)) { $func_data = $funcs($param); } if ($func_data) { $player_code = $func_data; $show_player = true; break; } } } if (function_exists('cbplayer') && empty($player_code)) { $player_code = cbplayer($param, true); } elseif (function_exists('cbplayer')) { return $player_code; } global $pak_player; if ($player_code) { if (!$pak_player && $show_player && !is_bool($player_code)) { assign("player_js_code", $player_code); Template(PLAYER_DIR . '/player.html', false); return false; } else { return false; } } return blank_screen($param); }
function cb_player($in) { global $cb_player; $cb_player = true; $vdetails = $in['vdetails']; $vid_file = get_video_file($vdetails, true, true); //Checking for YT Referal if (function_exists('get_refer_url_from_embed_code')) { $ref_details = get_refer_url_from_embed_code(unhtmlentities(stripslashes($vdetails['embed_code']))); $ytcode = $ref_details['ytcode']; } if ($vid_file || $ytcode) { $hd = $data['hq']; if ($hd == 'yes') { $file = get_hq_video_file($vdetails); } else { $file = get_video_file($vdetails, true, true); } $hd_file = get_hq_video_file($vdetails); if ($ytcode) { assign('youtube', true); assign('ytcode', $ytcode); } if (!strstr($in['width'], "%")) { $in['width'] = $in['width'] . 'px'; } if (!strstr($in['height'], "%")) { $in['height'] = $in['height'] . 'px'; } if ($in['autoplay'] == 'yes' || $in['autoplay'] === true || $_COOKIE['auto_play_playlist'] && ($_GET['play_list'] || $_GET['playlist'])) { $in['autoplay'] = true; } else { $in['autoplay'] = false; } //Logo Placement assign('logo_placement', cb_player_logo_position()); assign('logo_margin', config('logo_padding')); //Setting Skin assign('cb_skin', 'glow/glow.xml'); assign('player_data', $in); assign('player_logo', website_logo()); assign('normal_vid_file', $vid_file); assign("hq_vid_file", $hd_file); assign('vdata', $vdetails); Template(CB_PLAYER_DIR . '/cbplayer.html', false); return true; } }
/** * 商户管理后台初始化 * @author 王仁欢 */ function business_base_init() { if (!isset($_SESSION['business_account'])) { $links = array(array('link' => 'index.php', 'alt' => '登陆')); show_system_message('请先登陆', $links); exit; } global $db; $get_business = 'select * from ' . $db->table('business'); $get_business .= ' where business_account = \'' . $_SESSION['business_account'] . '\' and status = 2'; $business = $db->fetchRow($get_business); if (empty($business)) { if (isset($_SESSION['business_account'])) { unset($_SESSION['business_shop_name']); unset($_SESSION['business_account']); unset($_SESSION['business_purview']); } $links = array(array('link' => 'index.php', 'alt' => '重新登陆')); show_system_message('商户不存在或不在运营中', $links); exit; } $current_shop = $_SESSION['business_shop_name']; assign('current_shop', $current_shop); assign('pageTitle', '网店' . $current_shop . '管理后台'); create_business_menu(); $active_nav = get_active_nav(); $active_nav = explode('.', $active_nav); $active_nav = $active_nav[0]; assign('active_nav', $active_nav); if ($active_nav == 'virtual_product') { $active_nav = 'product'; } assign('menu_mark', 'menu_' . $active_nav); //未读消息数量 $get_unread_message_count = 'select count(*) from ' . $db->table('message'); $get_unread_message_count .= ' where business_account = \'' . $_SESSION['business_account'] . '\' and status = 0'; $unread_message_count = $db->fetchOne($get_unread_message_count); assign('unread_message_count', $unread_message_count); if ($_SESSION['business_account'] == $_SESSION['business_admin']) { $primary_account = true; } else { $primary_account = false; } assign('primary_account', $primary_account); }
/** * Show-rating function for cbv3 template * */ function cbv3_show_rating($rating) { $array = array(); if (error()) { $array['err'] = error(); } $array['rating'] = $rating; $rated_by = $rating['ratings']; $rating = $rating['rating']; $rating_full = $rating * 10; $likes = $rating_full * $rated_by / 100; $likes = round($likes + 0.49, 0); $dislikes = $rated_by - $likes; assign('rating', array('rating' => $rating, 'dislikes' => $dislikes, 'likes' => $likes, 'rated_by' => $rated_by, 'rating_perc' => $rating_full)); $template = Fetch('blocks/rating.html'); $array['template'] = $template; echo json_encode($array); }
/** * Loads ClipBucket players... * * @global type $Cbucket * @global type $swfobj * @param type $param * @return boolean * * @todo Write documentation on this function.. */ function cb_video_player($param) { global $Cbucket, $swfobj; $param['player_div'] = $param['player_div'] ? $param['player_div'] : 'videoPlayer'; $key = $param['key']; $code = $param['code']; $flv_url = $file; $embed = $param['embed']; $code = $param['code']; $height = $param['height'] ? $param['height'] : config('player_height'); $width = $param['width'] ? $param['width'] : config('player_width'); $param['height'] = $height; $param['width'] = $width; if (!$param['autoplay']) { $param['autoplay'] = config('autoplay_video'); } if (!$param['files']) { global $cbvid; $files = $cbvid->get_video_files($param['video']); $param['files'] = $files; } assign('player_params', $param); $param = apply_filters($param, 'play_video'); //Calling actions for play_video $output = call_actions('play_video', $param); if ($output) { $player_code = $output; return $output; } if (function_exists('cbplayer') && empty($player_code)) { $player_code = cbplayer($param, true); } if ($player_code) { if (!$pak_player && $show_player) { assign("player_js_code", $player_code); Template(PLAYER_DIR . '/player.html', false); return false; } else { return false; } } return blank_screen($param); }
function cb_video_js($in) { global $cb_video_js; $cb_video_js = true; $vdetails = $in['vdetails']; $video_play = get_video_files($vdetails, true, true); if (!strstr($in['width'], "%")) { $in['width'] = $in['width'] . 'px'; } if (!strstr($in['height'], "%")) { $in['height'] = $in['height'] . 'px'; } assign('height', $in['height']); assign('width', $in['width']); assign('player_config', $in); assign('vdata', $vdetails); assign('cb_logo', cb_logo()); assign('video_files', $video_play); Template(CB_VJS_PLAYER_DIR . '/cb_video_js.html', false); return true; }
function assign($timestorun, $zone, $idnum, $conn, $who) { $numleft = 96 - $timestorun; echo "<script type='text/javascript'>\n document.body.innerHTML = '';\n </script>"; echo "Assigning {$numleft} / 96 numbers!<br>"; ob_end_flush(); flush(); $timestorun--; if ($who == '0') { $sql = "SELECT IDKey FROM agents WHERE SupervisorID='{$idnum}' AND AccountType='0'"; } else { $sql = "SELECT IDKey FROM agents WHERE IDKey='{$who}'"; } //echo $sql; $result = mysqli_query($conn, $sql); while ($row = $result->fetch_assoc()) { $uid = $row["IDKey"]; // (Length(Pnumber)='14' OR Length(Pnumber)='10') AND $dsql = "SELECT min(IDNKey) FROM numbers WHERE (Zone LIKE '%{$zone}%' OR Address LIKE '%{$zone}%' OR Pcode LIKE '%{$zone}%') AND (AssignedUser IS NULL OR AssignedUser='******') AND Response='o'"; $dresult = mysqli_query($conn, $dsql); if (mysqli_num_rows($dresult) == 0) { echo "<br>No number assigned, Out of unassigned numbers in that area!<br>"; break; } $drow = $dresult->fetch_assoc(); $idn = $drow["min(IDNKey)"]; $csql = "UPDATE numbers SET AssignedUser='******' WHERE IDNKey='{$idn}'"; // echo $csql."<br>"; if ($conn->query($csql) === TRUE) { echo "Record updated successfully"; } else { echo "Error updating record: " . $conn->error; } } if ($timestorun > 0) { @assign($timestorun, $zone, $idnum, $conn, $who); } }
/** * Display a sider bar * * @todo Write documentation */ function sidebar($place = NULL, $echo = true) { global $Cbucket; if (!$place) { $place = 'default'; } $sidebar = $Cbucket->sidebars[$place]; if (!$sidebar) { $sidebar = $Cbucket->sidebars[$place . '-sidebar']; } if ($sidebar) { //Getting list of widgets... $widgets = get_sidebar_widgets($sidebar['id']); $sidebar_output = ""; foreach ($widgets as $w) { $widget = get_widget_details($w['id']); //for now, we will call our callback function only if (function_exists($widget['callback'])) { //Setting up options for widget that can be used //$widget[{option}] in php or $widget.{option} in smarty //$widget['before_title'] or $widget.before_title $widget_details = get_widget_details($widget['id'], $sidebar['id']); //Adding Some more options from sidebar... $widget_details['before_title'] = $sidebar['before_title']; $widget_details['after_title'] = $sidebar['after_title']; $widget_details['before_widget'] = $sidebar['before_widget']; $widget_details['after_widget'] = $sidebar['after_widget']; assign('widget', $widget_details); if ($widget['params']) { $sidebar_output .= $widget['callback']($widget_details, $widget['params']); } else { $sidebar_output .= $widget['callback']($widget_details); } } } return $sidebar_output; } }
function load_remote_upload_form($params = NULL) { global $file_name; assign('params', $params); Template(STYLES_DIR . '/global/remote_upload_form.html', false); return false; echo '<div class="alert alert-info marginTop"> ' . lang('upload_remote_video_msg') . ' </div>'; echo '<div class="upload_form_div clearfix form-group' . $class . '" id="remoteUploadFormDiv"> <label for="remote_file_url" class="label">' . lang('please_enter_remote_file_url') . '</label> <input name="remote_file_url" type="textfield" class="remoteUrlInput form-control" id="remote_file_url" value="' . lang('remote_upload_example') . '" onclick="if($(this).val()==\'' . lang('remote_upload_example') . '\') $(this).val(\'\')"/> <input name="submit_upload" type="hidden" value="' . lang('upload_data_now') . '"> <div id="remote_upload_result_cont"></div> <div class="remote_main_bar" id="main_bar"> <div id="prog_bar" class="remote_prog_bar"></div> </div> <div align="center" id="loading" style="margin:5px 0px"></div> <div> ' . lang('remoteDownloadStatusDiv') . ' </div> <div align="right"> <input type="button" name="ytUploadBttn" id="ytUploadBttn" value="' . lang('grab_from_youtube') . '" onClick="youtube_upload()" class="cbSubmitUpload"> <input type="button" name="remoteUploadBttn" id="remoteUploadBttn" value="' . lang('upload') . '" onClick="_cb.' . get_remote_url_function() . '" class="cbSubmitUpload"> <input type="button" name="remoteUploadBttnStop" id="remoteUploadBttnStop" value="' . lang('cancel') . '" class="cbSubmitUpload" style="display:none"/> </div> </div> <div id="remoteForm"></div> '; }
//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();
$page = intval($page); $count = intval($count); if (!in_array($count, $count_expected)) { $count = 10; } $total_page = ceil($total / $count); $page = $page > $total_page ? $total_page : $page; $page = $page <= 0 ? 1 : $page; $offset = ($page - 1) * $count; create_pager($page, $total_page, $total); assign('count', $count); assign('account', $account); assign('begin_time', $begin_time > 0 ? date('Y-m-d', $begin_time) : ''); assign('end_time', $end_time > 0 ? date('Y-m-d', $end_time) : ''); assign('recharge_sn', $recharge_sn); assign('status', $status); $get_recharge_list = 'select * from ' . $db->table('recharge') . $where . ' order by `recharge_sn` DESC limit ' . $offset . ',' . $count; $recharge_list = $db->fetchAll($get_recharge_list); if ($recharge_list) { foreach ($recharge_list as $k => $r) { if (check_purview('pur_recharge_edit', $_SESSION['purview']) && $r['status'] == 1) { $recharge_list[$k]['operation'] = '<a href="recharge.php?act=edit&sn=' . $r['recharge_sn'] . '">处理</a>'; } else { $recharge_list[$k]['operation'] = ''; } } } assign('recharge_list', $recharge_list); } assign('act', $act); $smarty->display($template . 'recharge.phtml');
$table = 'platform_admin'; $where = ' `account` = \'' . $_SESSION['account'] . '\''; $get_password = '******' . $db->table($table) . ' where'; $get_password .= $where; $get_password .= ' limit 1'; $old_password = $db->fetchOne($get_password); if (md5($password . PASSWORD_END) != $old_password) { $response['msg'] = '原密码不正确'; echo json_encode($response); exit; } $data = array('password' => md5($new_password . PASSWORD_END)); if ($db->autoUpdate($table, $data, $where)) { $response['msg'] = '修改密码成功'; } else { $response['msg'] = '系统繁忙,请稍后重试'; } echo json_encode($response); exit; } //====================================================================== if ('view' == $act) { $get_admin = 'select `name`, `email`, `mobile`, `sex` from ' . $db->table('platform_admin') . ' where `account` = \'' . $_SESSION['account'] . '\''; $get_admin .= ' and `account` = \'' . $_SESSION['account'] . '\' limit 1'; $admin = $db->fetchRow($get_admin); assign('admin', $admin); } if ('password' == $act) { } $template .= $act . '.phtml'; $smarty->display($template);
$category_ids_str = ''; if ($category_ids) { foreach ($category_ids as $key => $val) { $category_ids_tmp[] = $val['id']; } $category_ids_str = implode(',', $category_ids_tmp); } if ($category_ids_str == '') { $category_ids_str = $id; } else { $category_ids_str .= ',' . $id; } $now = time(); $get_product_list = 'select `product_sn`,`name`,`id`,if(`promote_end`>' . $now . ',`promote_price`,`price`) as `price`,`img` from ' . $db->table('product') . ' where `status`=4 and `category_id` in (' . $category_ids_str . ')'; switch ($state) { case 'price': $get_product_list .= ' order by `price` ASC'; break; case 'star': $get_product_list .= ' order by `star` DESC'; break; default: $get_product_list .= ' order by `add_time` DESC'; break; } $product_list = $db->fetchAll($get_product_list); assign('state', $state); assign('product_list', $product_list); assign('id', $id); assign('filter', json_encode($filter)); $smarty->display('product-list.phtml');
<?php /* Plugin Name: ClipBucket Editor's Pick Plugin Description: This plugin is used to display Editor's Pick Player On Home Page and also let you pick videos for editor's pick Author: Arslan Hassan Author Website: http://clip-bucket.com/ ClipBucket Version: 2 Version: 1.0 Website: http://clip-bucket.com/ Plugin Type: global */ if (!function_exists('editors_pick')) { define("editorspick_install", "installed"); assign("editorspick", EDITORSPICK); function editors_pick() { if ($_GET['add_editor_pick']) { $vid = mysql_clean($_GET['add_editor_pick']); add_to_editor_pick($vid); } if ($_GET['remove_editor_pick']) { $vid = mysql_clean($_GET['remove_editor_pick']); remove_vid_editors_pick($vid); } } /** * Function used to add video to editor's pick; */ function add_to_editor_pick($vid) {
$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; } } $counter = get_counter('channel', $count_query); if (!$counter) { //Collecting Data for Pagination $ucount = $u_cond; $ucount['count_only'] = true; $total_rows = get_users($ucount); $counter = $total_rows; update_counter('channel', $count_query, $counter);
$sn = getGET('sn'); if ($sn == '') { redirect('index.php'); } $sn = $db->escape($sn); //获取商家信息 $get_business_info = 'select * from ' . $db->table('business') . ' where `business_account`=\'' . $sn . '\''; $business = $db->fetchRow($get_business_info); assign('business', $business); //获取商家分类 $get_category = 'select `id`,`name` from ' . $db->table('category') . ' where `business_account`=\'' . $sn . '\' and `parent_id`=' . $business['category_id']; $category = $db->fetchAll($get_category); foreach ($category as $key => $c) { $get_children = 'select `id`,`name` from ' . $db->table('category') . ' where `parent_id`=' . $c['id']; $category[$key]['children'] = $db->fetchAll($get_children); } assign('category', $category); //获取商家全部产品 $now = time(); $get_product_list = 'select `name`,if(`promote_end`>' . $now . ',`promote_price`,`price`) as `price`,`id`,`img` from ' . $db->table('product') . ' where `status`=4 and `business_account`=\'' . $sn . '\''; $product_list = $db->fetchAll($get_product_list); assign('product_list', $product_list); //获取新添加的产品 $get_product_list = 'select `name`,`price`,`id`,`img` from ' . $db->table('product') . ' where `status`=4 and `business_account`=\'' . $sn . '\'' . ' and `add_time`>' . (time() - 3600 * 24 * 7); $new_product = $db->fetchAll($get_product_list); assign('new_product_count', count($new_product)); //获取轮播广告 $get_cycle_ad = 'select `img`,`url` from ' . $db->table('ad') . ' where `ad_pos_id`=3 and `business_account`=\'' . $sn . '\' order by `order_view`'; $cycle_ad = $db->fetchAll($get_cycle_ad); assign('cycle_ad', $cycle_ad); $smarty->display('shop.phtml');
<?php /* *************************************************************** | Copyright (c) 2007-2008 Clip-Bucket.com. All rights reserved. | @ Author : ArslanHassan | @ Software : ClipBucket , © PHPBucket.com **************************************************************** */ require '../includes/admin_config.php'; $userquery->admin_login_check(); $pages->page_redir(); /* Assigning page and subpage */ if (!defined('MAIN_PAGE')) { define('MAIN_PAGE', 'Tool Box'); } if (!defined('SUB_PAGE')) { define('SUB_PAGE', 'Server Modules Info'); } $ffmpegVersion = check_ffmpeg("ffmpeg"); assign("ffmpegVersion", $ffmpegVersion); $phpVersion = check_php_cli("php"); assign("phpVersion", $phpVersion); $MP4BoxVersion = check_mp4box("MP4Box"); assign("MP4BoxVersion", $MP4BoxVersion); $imagick_version = Imagick::getVersion(); $imagick_version_string = $imagick_version['versionString']; assign("imagick_version", $imagick_version_string); subtitle("ClipBucket Server Module Checker"); template_files("cb_mod_check.html"); display_it();
if ($password == '') { $response['msg'] = '请填写新密码'; } if (!isset($_SESSION['token']) || $_SESSION['token'] != 'verify message code success.') { $response['msg'] = '请先通过身份验证'; } if ($response['msg'] == '') { $password = md5($password . PASSWORD_END); $data = array('password' => $password); if ($db->autoUpdate('member', $data, '`account`=\'' . $_SESSION['account'] . '\'')) { $response['msg'] = '修改密码成功'; $response['error'] = 0; if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'login.php') === false) { $response['referer'] = $_SERVER['HTTP_REFERER']; } else { $response['referer'] = 'index.php'; } $response['referer'] = $ref; unset($_SESSION['token']); } else { $response['msg'] = '系统繁忙,请稍后再试'; } } echo json_encode($response); exit; } $_SESSION['token'] = 'can send message.'; $get_mobile = 'select `mobile` from ' . $db->table('member') . ' where `account`=\'' . $_SESSION['account'] . '\''; $mobile = $db->fetchOne($get_mobile); assign('mobile', $mobile); $smarty->display('password.phtml');
$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();
<?php /** * Created by PhpStorm. * User: apple * Date: 15/10/10 * Time: 上午10:06 */ include 'library/init.inc.php'; $id = intval(getGET('id')); if ($id <= 0) { redirect('index.php'); } $get_article = 'select `content`,`title`,`add_time`,`author`,`section_id` from ' . $db->table('content') . ' where `id`=' . $id; $article = $db->fetchRow($get_article); $pattern = '#<img src="([^"]*)"#'; $content = $article['content']; preg_match_all($pattern, $content, $matches); if ($matches) { foreach ($matches[1] as $match) { $temp = build_url($match); $content = str_replace('"' . $match . '"', '"' . $temp . '"', $content); } } $article['content'] = $content; assign('article', $article); $get_section = 'select `section_name`,`id` from ' . $db->table('section') . ' where `id`=' . $article['section_id']; assign('section', $db->fetchRow($get_section)); $smarty->display('news.phtml');
$offset = ($page - 1) * $count; create_pager($page, $total_page, $total); assign('count', $count); assign('keyword', $keyword); $get_content_list = 'select a.*, s.section_name from ' . $db->table('content') . ' as a'; $get_content_list .= ' left join ' . $db->table('section') . ' as s on s.id = a.section_id'; $get_content_list .= ' where a.status = 0' . $orWhere; $get_content_list .= ' order by a.order_view asc, a.add_time desc'; $get_content_list .= ' limit ' . $offset . ',' . $count; $content_list = $db->fetchAll($get_content_list); if ($content_list) { foreach ($content_list as $key => $content) { $content_list[$key]['add_time'] = date('Y-m-d H:i:s', $content['add_time']); } } assign('contentList', $content_list); } //从回收站撤销 if ('revoke' == $act) { if (!check_purview('pur_content_del', $_SESSION['purview'])) { show_system_message('权限不足', array()); exit; } $id = intval(getGET('id')); if (0 >= $id) { show_system_message('参数错误', array()); exit; } $id = intval($id); $revoke_content = 'update `' . DB_PREFIX . 'content` set `status`=1 where `id`=' . $id . ' limit 1'; if ($db->update($revoke_content)) {
<?php /* *************************************************************** | Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved. | @ Author : ArslanHassan | @ Software : ClipBucket , © PHPBucket.com *************************************************************** */ define("THIS_PAGE", "invite_group"); define("PARENT_PAGE", "groups"); require 'includes/config.inc.php'; $pages->page_redir(); $url = mysql_clean($_GET['url']); $details = $cbgroup->group_details_url($url); assign('group', $details); if (!$cbgroup->is_owner($details)) { e(lang("you_cant_invite_mems")); } else { if ($details) { assign('friends', $userquery->get_contacts(userid(), 0)); } //Inviting Friends if (isset($_POST['invite_friends'])) { $cbgroup->invite_members($_POST['friend'], $details['group_id']); } assign('mode', "invite_group"); template_files('view_group.html'); subtitle(lang("grp_invite_msg")); display_it(); }