本文整理汇总了PHP中template_files函数的典型用法代码示例。如果您正苦于以下问题:PHP template_files函数的具体用法?PHP template_files怎么用?PHP template_files使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了template_files函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$this->load->helper('form');
$this->load->helper('template_files');
$template_files = template_files();
$data = array('template_files' => $template_files, 'paywall_auto' => setting('paywall_auto'), 'paywall_template' => setting('paywall_template'));
$this->load->view('paywall_configuration', $data);
}
示例2: array
$userquery->removeProfileItem();
}
//Getting Video List
$vid_array = array('user' => $udetails['userid'], 'limit' => $get_limit);
if (get('query') != '') {
$vid_array['title'] = mysql_clean(get('query'));
$vid_array['tags'] = mysql_clean(get('query'));
}
if (get('order') == 'oldest') {
$vid_array['order'] = ' date_added ASC ';
} else {
$vid_array['order'] = ' date_added DESC ';
}
if (get('broadcast') && is_valid_broadcast(get('broadcast'))) {
$vid_array['broadcast'] = mysql_clean(get('broadcast'));
}
$videos = get_videos($vid_array);
Assign('uservids', $videos);
Assign('videos', $videos);
//Collecting Data for Pagination
$vid_array['count_only'] = true;
$total_rows = get_videos($vid_array);
assign('total_videos', $total_rows);
$total_pages = count_pages($total_rows, VLISTPP);
//Pagination
$pages->paginate($total_pages, $page);
subtitle(lang("vdo_manage_vdeos"));
break;
}
template_files('manage_videos.html');
display_it();
示例3: count
$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();
示例4: define
* @author Saqib Razzaq
* @since 9th July, 2015 (ClipBucket 2.7.4)
*/
define('CB_CAPTCHA', basename(dirname(__FILE__)));
// checks user's input
function validate_user_ans()
{
if (isset($_POST['signup'])) {
$result = $_POST['g-recaptcha-response'];
if ($result == '') {
header("Location: http://localhost/cb_svn/upload/signup.php?valid=fail");
}
}
}
if (isset($_POST['signup'])) {
validate_user_ans();
}
// displaying the form
function the_form()
{
global $db;
$key_check = $db->_select('SELECT the_key FROM ' . tbl("the_captcha"));
$the_key = $key_check[0]['the_key'];
$site_key = $the_key;
echo '<div class="g-recaptcha" data-sitekey=' . $site_key . '></div>';
}
register_anchor_function("the_form", "the_form");
add_admin_menu("CB Captcha", "reCaptcha Key", "cb_captcha_admin.php", CB_CAPTCHA);
// used for displaying message on failure of captcha
template_files(PLUG_DIR . "/cb_captcha/captcha.html");
示例5: Copyright
<?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();
示例6: get_collections
$collections = get_collections(array("active" => "yes", "limit" => $start_index . "," . $loop_size));
$total_collections = get_collections(array("count_only" => true, "active" => "yes"));
$percent = $cbindex->percent(50, $total_collections);
$i = 0;
assign('total', $total_collections);
assign('from', $start_index + 1);
$to = $start_index + $loop_size;
if ($to > $total_collections) {
$to = $total_collections;
e($total_collections . " collections have been reindexed successfully.", "m");
assign("stop_loop", "yes");
}
assign('to', $to);
while ($i < $total_collections) {
if ($collections[$i]['collection_id']) {
$params = array("collection_id" => $collections[$i]['collection_id'], "total_items" => true, "total_comments" => true);
$indexes = $cbindex->count_index("collections", $params);
$fields = $cbindex->extract_fields("collections", $params);
$msg[] = $collections[$i]['collection_id'] . ": Updating <strong><em>" . $collections[$i]['collection_name'] . "</em></strong>";
$cbindex->update_index("collections", array("fields" => $fields, "values" => $indexes, "photo_id" => $collections[$i]['collection_id']));
}
$i++;
}
e($start_index + 1 . " - " . $to . " collections have been reindexed successfully.", "m");
assign("index_msgs", $msg);
assign("indexing", "yes");
assign('mode', 'index_collections');
}
subtitle("Re-index Clipbucket");
template_files('reindex_cb.html');
display_it();
示例7: mysql_clean
$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);
subtitle("Group Manager");
template_files('groups_manager.html');
display_it();
示例8: switch
}
switch ($mode) {
case "view":
default:
assign("mode", "view");
//Getting Video List
$page = mysql_clean($_GET['page']);
$get_limit = create_query_limit($page, 5);
$photos = $cbphoto->action->get_flagged_objects($get_limit);
assign('photos', $photos);
//Collecting Data for Pagination
$total_rows = $cbphoto->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");
$pid = mysql_clean($_GET['pid']);
$pdetails = $cbphoto->get_photo($pid);
if ($pdetails) {
$flags = $cbphoto->action->get_flags($pid);
assign('flags', $flags);
assign('photo', $pdetails);
} else {
e("Photo does not exist");
}
}
subtitle("Flagged Photos");
template_files('flagged_photos.html');
display_it();
示例9: Assign
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();
示例10: config
}
}
# 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();
示例11: assign
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';
$userquery->logincheck();
$u = $_GET['user'];
$u = $u ? $u : $_GET['userid'];
$u = $u ? $u : $_GET['username'];
$u = $u ? $u : $_GET['uid'];
$u = $u ? $u : $_GET['u'];
$u = mysql_clean($u);
$udetails = $userquery->get_user_details($u);
if($udetails)
{
示例12: Copyright
<?php
/*
***************************************************************
| Copyright (c) 2007-2010 Clip-Bucket.com. All rights reserved.
| @ Author : ArslanHassan
| @ Software : ClipBucket , © PHPBucket.com
***************************************************************
*/
define("THIS_PAGE", "create_group");
define("PARENT_PAGE", "groups");
require 'includes/config.inc.php';
$userquery->logincheck();
$pages->page_redir();
// Creating Group if button is pressed
if (isset($_POST['create_group'])) {
$cbgroup->create_group($_POST, userid(), true);
}
subtitle(lang('grp_crt_grp'));
template_files('create_group.html');
display_it();
示例13: is_numeric
$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)) {
$text_query = "text LIKE '%{$text}%'";
}
if (!empty($text_query) || !empty($varname_query)) {
if (!empty($text_query) && !empty($varname_query)) {
$or = ' OR ';
}
$extra_param = " AND ( {$varname_query} {$or} {$text_query} )";
}
}
$lang_phrases = $lang_obj->get_phrases($edit_id, '*', $curr_limit, $extra_param);
$total_phrases = $lang_obj->count_phrases($edit_id, $extra_param);
assign('lang_phrases', $lang_phrases);
//Collecting Data for Pagination
//echo 'id='.$edit_id.',toalal='.$total_phrases;
$total_pages = $total_phrases / $limit;
$total_pages = round($total_pages + 0.49, 0);
//Pagination
$pages->paginate($total_pages - 2, $current_page);
}
subtitle("Language Settings");
template_files('language_settings.html');
display_it();
示例14: assign
}
}
//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();
示例15: array
if (isset($_GET['search'])) {
$array = array('userid' => $_GET['userid'], 'username' => $_GET['username'], 'category' => $_GET['category'], 'featured' => $_GET['search_featured'], 'ban' => $_GET['search_ban'], 'status' => $_GET['status'], 'email' => $_GET['email'], 'gender' => $_GET['gender'], 'level' => $_GET['level']);
}
$result_array = $array;
//Getting Video List
$result_array['limit'] = $get_limit;
if (!$array['order']) {
$result_array['order'] = " doj DESC ";
}
$users = get_users($result_array);
Assign('users', $users);
//Collecting Data for Pagination
$mcount = $array;
$mcount['count_only'] = true;
$total_rows = get_users($mcount);
$total_pages = count_pages($total_rows, RESULTS);
$pages->paginate($total_pages, $page);
//Pagination
$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[]', 'sep' => '<div></div>', 'id' => 'category', 'class' => 'checkbox', 'value' => array('category', $cats_array), 'hint_1' => lang('vdo_cat_msg'), 'display_function' => 'convert_to_categories', 'category_type' => 'user');
assign('cat_array', $cat_array);
subtitle("Members Manager");
template_files('members.html');
display_it();