本文整理汇总了PHP中bTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP bTemplate类的具体用法?PHP bTemplate怎么用?PHP bTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了bTemplate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: return_error
function return_error($heading = 'Error!', $string)
{
global $language, $STYLEPATH, $page, $STYLEURL;
$THIS_BASEPATH = "..";
require "{$THIS_BASEPATH}/btemplate/bTemplate.php";
// just in case not found the language
if (!$language['BACK']) {
$language['BACK'] = 'Back';
}
$err_tpl = new bTemplate();
$err_tpl->set('error_title', $heading);
$err_tpl->set('error_message', $string);
$err_tpl->set('error_image', $STYLEURL . '/images/error.gif');
$err_tpl->set('language', $language);
$err_tpl->set('error_footer', '<a href="javascript: history.go(-1);">' . $language['BACK'] . '</a>');
return $err_tpl->fetch(load_template('error.tpl'));
}
开发者ID:Karpec,项目名称:gizd,代码行数:17,代码来源:admin.modpanel.php
示例2: number_format
} else {
if ($sr >= 0.25) {
$s = "images/smilies/sad.gif";
} else {
$s = "images/smilies/thumbsdown.gif";
}
}
}
}
}
$ratio = number_format($sr, 2) . " <img src=\"{$s}\" alt=\"\" />";
} else {
$ratio = '∞';
}
$utorrents = intval($CURUSER["torrentsperpage"]);
$userdetailtpl = new bTemplate();
$userdetailtpl->set("language", $language);
$userdetailtpl->set("userdetail_username", unesc($row["username"]));
// just current username viewing the page - start
$userdetailtpl->set("current_username", unesc($CURUSER["username"]));
// just current username viewing the page - end
//$userdetailtpl-> set("userdetail_no_guest", $CURUSER["uid"]>1, TRUE);
if ($CURUSER["uid"] > 1 && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_send_pm", " <a href=\"index.php?page=usercp&do=pm&action=edit&uid=" . $CURUSER["uid"] . "&what=new&to=" . urlencode(unesc($row["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", $language["PM"]) . "</a>");
}
if ($CURUSER["edit_users"] == "yes" && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_edit", "  <a href=\"index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=users&action=edit&uid={$id}&returnto=index.php?page=userdetails&id={$id}\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"]) {
$userdetailtpl->set("userdetail_delete", "  <a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=users&action=delete&uid={$id}&smf_fid=" . $row["smf_fid"] . "&returnto=" . urlencode("index.php?page=users") . ">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>");
}
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:userdetails.php
示例3: get_result
$res = get_result("SELECT size FROM {$TABLE_PREFIX}files WHERE info_hash='{$id}'", true);
if ($res) {
$row = $res[0];
if ($row) {
$tsize = 0 + $row["size"];
}
} else {
die("Error ID");
}
if ($XBTT_USE) {
$res = get_result("SELECT x.uid,x.completed, x.downloaded, x.uploaded, x.left as bytes, IF(x.left=0,'seeder','leecher') as status, x.mtime as lastupdate, u.username, u.flag, c.flagpic, c.name FROM xbt_files_users x LEFT JOIN xbt_files ON x.fid=xbt_files.fid LEFT JOIN {$TABLE_PREFIX}files f ON f.bin_hash=xbt_files.info_hash LEFT JOIN {$TABLE_PREFIX}users u ON u.id=x.uid LEFT JOIN {$TABLE_PREFIX}countries c ON u.flag=c.id WHERE f.info_hash='{$id}' AND active=1 ORDER BY status DESC, lastupdate DESC", true, $btit_settings['cache_duration']);
} else {
$res = get_result("SELECT * FROM {$TABLE_PREFIX}peers p LEFT JOIN {$TABLE_PREFIX}countries c ON p.dns=c.domain WHERE infohash='{$id}' ORDER BY bytes ASC, status DESC, lastupdate DESC", true, $btit_settings['cache_duration']);
}
require load_language("lang_peers.php");
$peerstpl = new bTemplate();
$peerstpl->set("language", $language);
$peerstpl->set("peers_script", "index.php");
if (count($res) == 0) {
$peerstpl->set("NOPEERS", TRUE, TRUE);
} else {
$peerstpl->set("NOPEERS", FALSE, TRUE);
foreach ($res as $id => $row) {
// for user name instead of peer
if ($XBTT_USE) {
$resu = TRUE;
} elseif ($PRIVATE_ANNOUNCE) {
$resu = get_result("SELECT u.username,u.id,c.flagpic,c.name FROM {$TABLE_PREFIX}users u LEFT JOIN {$TABLE_PREFIX}countries c ON c.id=u.flag WHERE u.pid='" . $row["pid"] . "' LIMIT 1", true, $btit_settings['cache_duration']);
} else {
$resu = get_result("SELECT u.username,u.id,c.flagpic,c.name FROM {$TABLE_PREFIX}users u LEFT JOIN {$TABLE_PREFIX}countries c ON c.id=u.flag WHERE u.cip='" . $row["ip"] . "' LIMIT 1", true, $btit_settings['cache_duration']);
}
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:peers.php
示例4: die
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
// load language file
require load_language("lang_lottery.php");
function get_value($what, $table, $area, $id)
{
global $TABLE_PREFIX;
$query = do_sqlquery("SELECT {$what} FROM {$TABLE_PREFIX}{$table} WHERE {$area}={$id}", true);
$object_to_array = mysql_fetch_array($query) or sql_err(__FILE__, __LINE__);
return $object_to_array[$what];
}
$query = do_sqlquery("SELECT * FROM `{$TABLE_PREFIX}lottery_winners`", true);
$ticketstpl = new bTemplate();
$ticketstpl->set("language", $language);
if (mysql_num_rows($query) == 0) {
$ticketstpl->set("are_winners", false, true);
} else {
$ticketstpl->set("are_winners", true, true);
$won = array();
$x = 0;
while ($users = mysql_fetch_assoc($query)) {
$won[$x]["winner"] = $users["win_user"];
$won[$x]["date"] = $users["windate"];
$won[$x]["price"] = makesize($users["price"]);
$x++;
$ticketstpl->set("winner", $won);
}
}
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:data-file.view_winners.php
示例5: die
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
global $TABLE_PREFIX, $CURUSER;
require load_language("lang_shoutcast.php");
$djtpl = new bTemplate();
$djtpl->set("language", $language);
$pages = explode(",", $language['pages']);
if (!in_array($_GET['do'], $pages)) {
stderr($language['ERROR'], $language['strange']);
}
if ($_GET['do'] == 'manage') {
$query = do_sqlquery('SELECT activedays, activetime, genre FROM ' . $TABLE_PREFIX . 'shoutcastdj WHERE active = \'1\' AND uid = \'' . $CURUSER['uid'] . '\'', true);
if (mysqli_num_rows($query) == 0) {
stderr($language['ERROR'], $language['hey']);
}
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
$availabledays = array(1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat', 7 => 'Sun');
$activedays = $_POST['activedays'];
$activetime = trim($_POST['activetime']);
$genre = trim($_POST['genre']);
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:dj.php
示例6: die
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
require_once "include/functions.php";
require_once "include/config.php";
dbconn();
$expectedtpl = new bTemplate();
$expectedtpl->set("language", $language);
$expectedtpl->set("ex2", "<br>\n");
$where = "WHERE userid = " . $CURUSER["uid"] . "";
$res2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}expected {$where}") or sqlerr();
$num2 = mysqli_num_rows($res2);
$expectedtpl->set("ex4", "<table border=0 width=100% cellspacing=0 cellpadding=3>");
$expectedtpl->set("ex6", "<tr><td class=colhead align=center><center>" . $language["SEARCH"] . " " . $language["TORRENT"] . "</center></td></tr>");
$expectedtpl->set("ex8", "<tr><td align=center><form method=get action=index.php><input type=hidden name=page value=torrents />");
$expectedtpl->set("ex10", "<input type=text name=search size=40 value={$searchstr} >");
$expectedtpl->set("ex12", "in");
$expectedtpl->set("ex14", "<select name=category>");
$expectedtpl->set("ex16", "<option value=0>" . $language["ALL"] . "</option>");
$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:expected.php
示例7: die
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
//by CobraCRK 21.07.2006 - www.extremeshare.org - [email protected]
//converted to xbtit by cooly
if (!defined("IN_BTIT")) {
die("non direct access!");
}
global $CURUSER;
require "include/sanitize.php";
$subsedittpl = new bTemplate();
require load_language("lang_subs.php");
if ($CURUSER["can_upload"] == "no") {
err_msg(ERROR, NOT_AUTH_VIEW_NEWS);
stdfoot();
exit;
}
$action = $_GET["action"];
if ($action == "edit") {
$id = $_GET["id"];
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}subtitles WHERE id=" . $_GET['id']) or sqlerr();
if (mysqli_num_rows($res) != 1) {
stderr("Error", "No message with ID {$id}.");
}
$arr = mysqli_fetch_assoc($res);
if ($CURUSER["uid"] != $arr["uploader"] or $CURUSER["edit_torrents"] != "yes") {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:subs_edit.php
示例8: do_sqlquery
$status = 1;
}
// Announce new Uploaded torrents in ShoutBoX start
global $BASEURL;
do_sqlquery("INSERT INTO {$TABLE_PREFIX}chat (uid, time, name, text) VALUES (0," . time() . ", 'System','[color=red]NEW TORRENT[/color]: [url={$BASEURL}/index.php?page=torrent-details&id={$hash}]" . $filename . "[/url]')");
// Announce new Uploaded torrents in ShoutBoX ends
} else {
err_msg($language["ERROR"], $language["ERR_ALREADY_EXIST"]);
unlink($_FILES["torrent"]["tmp_name"]);
stdfoot();
die;
}
} else {
$status = 0;
}
$uploadtpl = new bTemplate();
/*
Mod by losmi -sticky torrent
*/
$query = "SELECT * FROM {$TABLE_PREFIX}sticky";
$rez = do_sqlquery($query, true);
$rez = mysql_fetch_assoc($rez);
$rez_level = $rez['level'];
$current_level = getLevel($CURUSER['id_level']);
$level_ok = false;
if ($CURUSER["uid"] > 1 && $current_level >= $rez_level && $CURUSER['can_upload'] == 'yes') {
$uploadtpl->set("LEVEL_OK", true, FALSE);
} else {
$uploadtpl->set("LEVEL_OK", false, TRUE);
}
unset($rez);
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:upload.php
示例9: htmlspecialchars
}
}
#
############################ #
$scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=users");
$res = get_result("select COUNT(*) as tu FROM {$TABLE_PREFIX}users u INNER JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id WHERE u.id>1 {$where}", true, $btit_settings['cache_duration']);
$count = $res[0]['tu'];
list($pagertop, $pagerbottom, $limit) = pager(20, $count, $scriptname . "&" . $addparams . (strlen($addparam) > 0 ? "&" : "") . "order={$order_param}&by={$by_param}&");
if ($by == "ASC") {
$mark = " ↑";
} else {
$mark = " ↓";
}
// load language file
require load_language("lang_users.php");
$userstpl = new bTemplate();
$userstpl->set("language", $language);
$userstpl->set("users_search", $search);
if ($btit_settings["slon"] == true && $CURUSER["delete_users"] == "yes") {
$userstpl->set("shli", "Shitlist");
} else {
$userstpl->set("shli", "");
}
# Search by ip, email, pid # 2 # last
#'
$userstpl->set("smail", $searchmail);
$userstpl->set("sip", $searchip);
$userstpl->set("pid", $getpid);
#
################################# End
$userstpl->set("users_search_level", $level == 0 ? " selected=\"selected\" " : "");
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:users.php
示例10: dbconn
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
require_once "include/functions.php";
require_once "include/config.php";
dbconn(true);
global $SITENAME, $btit_settings;
$agreetpl = new bTemplate();
$agreetpl->set("language", $language);
$agreetpl->set("ua1", "<table width=95% cellspacing=0 cellpadding=5 border=0 align=center>");
$agreetpl->set("ua2", "<tr>");
$agreetpl->set("ua3", "<td valign=top width=63%>");
$agreetpl->set("ua4", $btit_settings["oa_one_text"]);
$agreetpl->set("ua5", $btit_settings["oa_two_text"]);
$agreetpl->set("ua8", $btit_settings["oa_three_text"]);
$agreetpl->set("ua9", $btit_settings["oa_four_text"]);
$date = date("j.M.Y H:i l");
$agreetpl->set("ua6", $date);
$agreetpl->set("ua7", $SITENAME);
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:agree.php
示例11: linkcolor
} else {
$seedbox[$i]["sw27"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\">---</td>";
}
}
} else {
// linkcolor
$seedbox[$i]["sw28"] = "<td align=\"center\" class=\"" . linkcolor($data["seeds"]) . "\" style=\"text-align: center;\">" . $data["seeds"] . "</td>";
$seedbox[$i]["sw29"] = "<td align=\"center\" class=\"" . linkcolor($data["leechers"]) . "\" style=\"text-align: center;\">" . $data["leechers"] . "</td>";
if ($data["finished"] > 0) {
$seedbox[$i]["sw30"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\">" . $data["finished"] . "</td>";
} else {
$seedbox[$i]["sw30"] = "<td align=\"center\" class=\"lista\" style=\"text-align: center;\">---</td>";
}
}
$seedbox[$i]["sw34"] = "</tr>\n";
}
}
$i++;
$seedboxtpl->set("seedbox", $seedbox);
}
} else {
$seedboxtpl->set("sw35", "<tr><td class=\"lista\" colspan=\"9\" align=\"center\" style=\"text-align: center;\">" . $language["NO_TORRENTS"] . "</td></tr>");
}
$seedboxtpl->set("sw36", "</table>");
} else {
$seedboxtpl = new bTemplate();
$seedboxtpl->set("language", $language);
$seedboxtpl->set("sw37", "<table class=\"lista\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" align=\"center\"><tr><td><div align=\"center\" style=\"text-align: center;\">" . $language["NO_TORRENTS"] . "</div></td></tr></table>");
}
}
// end if user can view
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:seedbox.php
示例12: bTemplate
exit;
}
global $language, $newstpl;
$newstpl = new bTemplate();
$newstpl->set("language", $language);
$newstpl->set("ADD_EDIT", true, true);
$tplnews = array();
$tplnews["action"] = "index.php?page=news&act=confirm";
$tplnews["hidden_action"] = $action;
$tplnews["hidden_id"] = $_GET["id"];
$tplnews["news_title"] = $title;
$tplnews["bbcode"] = textbbcode("news", "news", $news);
$newstpl->set("news", $tplnews);
} elseif ($action == "add") {
global $news, $title, $CURUSER, $language, $newstpl;
$newstpl = new bTemplate();
$newstpl->set("language", $language);
$newstpl->set("ADD_EDIT", true, true);
$tplnews = array();
$tplnews["action"] = "index.php?page=news&act=confirm";
$tplnews["hidden_action"] = $action;
$tplnews["hidden_id"] = $_GET["id"];
$tplnews["news_title"] = $title;
$tplnews["bbcode"] = textbbcode("news", "news", $news);
$newstpl->set("news", $tplnews);
} elseif ($action == "confirm") {
if (!isset($_POST["conferma"])) {
} elseif ($_POST["conferma"] == $language["FRM_CONFIRM"]) {
if (isset($_POST["news"]) && isset($_POST["title"])) {
$news = $_POST["news"];
$uid = $CURUSER["uid"];
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:news.php
示例13: bTemplate
}
$last = "<tr><td colspan=\"2\" class=\"header\" align=\"center\">You have <span style=\"color:#FF6666\">" . $logins_left . "</span> remaining login attempt" . $ss . ".</td></tr>";
$logintpl->set("last", $last);
}
//Invalid Login System Hack stop
$login["create"] = "index.php?page=signup";
$login["recover"] = "index.php?page=recover";
$logintpl->set("login", $login);
if ($btit_settings["site_offline"]) {
$logintpl->set("SITE_OFFLINE", true, true);
$logintpl->set("offline_msg", $btit_settings["offline_msg"]);
} else {
$logintpl->set("SITE_OFFLINE", false, true);
}
}
$logintpl = new bTemplate();
if ($btit_settings["fbon"] == true) {
$logintpl->set("FB", true, true);
} else {
$logintpl->set("FB", false, true);
}
if (!$CURUSER || $CURUSER["uid"] == 1) {
if (isset($_POST["uid"]) && $_POST["uid"]) {
$user = $_POST["uid"];
} else {
$user = "";
}
if (isset($_POST["pwd"]) && $_POST["pwd"]) {
$pwd = $_POST["pwd"];
} else {
$pwd = "";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:login.php
示例14: die
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
if (!defined("IN_ACP")) {
die("non direct access!");
}
global $THIS_BASEPATH, $language, $THE_BASEPATH;
$admintpl = new bTemplate();
$admintpl->set("frm_action", "index.php?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=featured&action=save&mode=new");
/* Admin tool for the Featured Torrent*/
// include language file
include load_language("lang_featured.php");
switch ($action) {
case 'save':
if ($_POST["id"]) {
$tor_id = $_POST["id"];
do_sqlquery("INSERT INTO {$TABLE_PREFIX}featured (fid,torrent_id) VALUES ('','{$_POST['id']}')");
}
case 'read':
default:
if ($btit_settings["imdbbl"] == true) {
$query = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT info_hash, filename from {$TABLE_PREFIX}files where imdb!='' ORDER BY data DESC limit 15");
} else {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:admin.featured.php
示例15: UNIX_TIMESTAMP
$tseeds = "f.seeds as seeds";
$tleechs = "f.leechers as leechers";
$tcompletes = "f.finished as finished";
$ttables = "{$TABLE_PREFIX}files f";
}
$query = "SELECT f.multiplier,f.team,f.language,f.tag,f.youtube_video, f.imdb, f.staff_comment, f.gold, f.image, f.screen1, f.screen2, f.screen3, f.vip_torrent, f.info_hash, f.filename,f.sticky, f.url, UNIX_TIMESTAMP(f.data) as data, f.size, f.comment, f.category as cat_name, {$tseeds}, {$tleechs}, {$tcompletes}, f.speed, f.uploader FROM {$ttables} WHERE f.info_hash ='" . AddSlashes($_GET["info_hash"]) . "'";
$res = do_sqlquery($query, true);
$results = mysqli_fetch_assoc($res);
if (!$results || mysqli_num_rows($res) == 0) {
err_msg($language["ERROR"], $language["TORRENT_EDIT_ERROR"]);
} else {
if (!$CURUSER || $CURUSER["uid"] < 2 || $CURUSER["edit_torrents"] == "no" && $CURUSER["uid"] != $results["uploader"]) {
stderr($language["ERROR"], $language["CANT_EDIT_TORR"]);
}
$moder_status = getmoderstatusbyhash(AddSlashes($_GET["info_hash"]));
$torrenttpl = new bTemplate();
$torrenttpl->set("language", $language);
// $row=$res[0];
$torrenttpl->set("imageon", $GLOBALS["imageon"] == "true", TRUE);
$torrenttpl->set("screenon", $GLOBALS["screenon"] == "true", TRUE);
if ($btit_settings["imgsw"] == true) {
$torrenttpl->set("uplink", false, TRUE);
$torrenttpl->set("uplinkk", false, TRUE);
$torrenttpl->set("uplo", true, FALSE);
$torrenttpl->set("uplok", true, FALSE);
} else {
$torrenttpl->set("uplink", true, FALSE);
$torrenttpl->set("uplinkk", true, FALSE);
$torrenttpl->set("uplo", false, TRUE);
$torrenttpl->set("uplok", false, TRUE);
}
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:edit.php
示例16: textbbcode
function textbbcode($form, $name, $content = '')
{
$tpl_bbcode = new bTemplate();
$tpl_bbcode->set('form_name', $form);
$tpl_bbcode->set('object_name', $name);
$tpl_bbcode->set('content', $content);
$tbbcode = '<table width="100%" cellpadding="1" cellspacing="1">';
global $smilies, $STYLEPATH, $language;
$count = 0;
reset($smilies);
$tbbcode .= '<tr>';
while ((list($code, $url) = each($smilies)) && $count < 16) {
$tbbcode .= "\n<td><a href=\"javascript: SmileIT('" . str_replace("'", "\\'", $code) . "',document.forms.{$form}.{$name});\"><img border=\"0\" src=\"images/smilies/{$url}\" alt=\"{$url}\" /></a></td>";
$count++;
}
$tbbcode .= "\n</tr>\n</table>";
$tpl_bbcode->set('smilies_table', $tbbcode);
$tpl_bbcode->set('language', $language);
return $tpl_bbcode->fetch(load_template('txtbbcode.tpl'));
}
开发者ID:Karpec,项目名称:gizd,代码行数:20,代码来源:functions.php
示例17: do_sqlquery
}
do_sqlquery("UPDATE `{$TABLE_PREFIX}users` SET `trophy`='0' WHERE `id`=" . $loser . "", true);
do_sqlquery("UPDATE `{$TABLE_PREFIX}users` SET `trophy`='1' WHERE `id`=" . $user . "", true);
$al = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}chat ORDER BY id DESC LIMIT 1");
$rw = mysqli_fetch_assoc($al);
$ct = $rw["count"] + 1;
do_sqlquery("INSERT INTO {$TABLE_PREFIX}chat (uid, time, name, text,count) VALUES (0," . time() . ", 'System','[color=red]NEW HIGHSCORE FOR[/color]: [img]{$BASEURL}/flash/trappedinawell1.gif[/img] Score: " . $score . " By " . $arcadeuser . " Award: " . $arte . "'," . $ct . ")");
}
}
mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO `{$TABLE_PREFIX}flashscores` ( `ID` , `game` , `user` , `level` , `score` ,`date` ) VALUES ( '', '" . $game . "', '" . $user . "', '" . $level . "', '" . $score . "',NOW());") or die(is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
redirect("index.php?page=arcadex");
}
}
}
///////////////////////END ARCADE//////////////////////
$tpl = new bTemplate();
$tpl->set("main_title", $btit_settings["name"] . " .::. " . "Index");
// is language right to left?
if (!empty($language["rtl"])) {
$tpl->set("main_rtl", " dir=\"" . $language["rtl"] . "\"");
} else {
$tpl->set("main_rtl", "");
}
if (!empty($language["charset"])) {
$GLOBALS["charset"] = $language["charset"];
$btit_settings["default_charset"] = $language["charset"];
}
$tpl->set("main_charset", $GLOBALS["charset"]);
$tpl->set("main_css", "{$style_css}");
require_once "{$THIS_BASEPATH}/include/blocks.php";
// no collapse for guests
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:index.php
示例18: str_replace
$pagerbottom = str_replace("change_page", "change_page1", $pager) . "\n";
} else {
$pagertop = "{$pager}\n</form>";
$pagerbottom = str_replace("change_page", "change_page1", $pagertop) . "\n";
}
$start = ($page - 1) * $rpp;
if ($pages < 2) {
// only 1 page??? don't need pager ;)
$pagertop = "";
$pagerbottom = "";
}
return array($pagertop, $pagerbottom, "LIMIT {$start},{$rpp}");
}
$FORUM_PATH = dirname(__FILE__);
include load_language("lang_forum.php");
$forumtpl = new bTemplate();
$forumtpl->set("language", $language);
switch ($action) {
case 'editpost':
include "{$FORUM_PATH}/forum.post.php";
$tpl->set("main_content", set_block($block_title, "center", $forumtpl->fetch(load_template("forum.editpost.tpl"))));
break;
case 'catchup':
case 'deletetopic':
case 'movetopic':
case 'setsticky':
case 'rename':
case 'setlocked':
case 'deletepost':
include "{$FORUM_PATH}/forum.actions.php";
break;
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:forum.index.php
示例19: die
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
if (!defined("IN_BTIT")) {
die("non direct access!");
}
require_once "include/functions.php";
dbconn();
$friend_id = (int) $_GET["frid"];
$friendstpl = new bTemplate();
$friendstpl->set("language", $language);
// username
$name = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username FROM {$TABLE_PREFIX}users WHERE id=" . $friend_id);
$nam = mysqli_fetch_array($name);
$friendstpl->set("un", $nam["username"]);
//end username
$qryf = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT * FROM {$TABLE_PREFIX}friendlist WHERE rejected='no' AND confirmed='yes' AND (user_id = " . $friend_id . " OR friend_id = " . $friend_id . ")");
$counf = mysqli_num_rows($qryf);
$friend = array();
$i = 0;
if ($counf == 0) {
$friend[$i]["avatar"] = "<center><font color = red>there</font></center>";
$friend[$i]["name"] = "<center><font color = red>are</font></center>";
$friend[$i]["level"] = "<center><font color = red>no</font></center>";
$friend[$i]["acces"] = "<center><font color = red>friends</font></center>";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:friends.php
示例20: mysql_query
@mysql_query("DELETE FROM {$TABLE_PREFIX}comments WHERE info_hash=\"{$hash}\"");
@mysql_query("DELETE FROM {$TABLE_PREFIX}ratings WHERE infohash=\"{$hash}\"");
@mysql_query("DELETE FROM {$TABLE_PREFIX}peers WHERE infohash=\"{$hash}\"");
@mysql_query("DELETE FROM {$TABLE_PREFIX}history WHERE infohash=\"{$hash}\"");
if ($XBTT_USE) {
mysql_query("UPDATE xbt_files SET flags=1 WHERE info_hash=UNHEX('{$hash}')") or die(mysql_error());
}
unlink($TORRENTSDIR . "/{$hash}.btf");
redirect($link);
exit;
} else {
redirect($link);
exit;
}
}
$torrenttpl = new bTemplate();
$torrenttpl->set("language", $language);
$torrent = array();
$torrent["filename"] = $row["filename"];
$torrent["info_hash"] = $row["info_hash"];
$torrent["description"] = format_comment($row["comment"]);
$torrent["catname"] = $row["cat_name"];
$torrent["size"] = makesize($row["size"]);
include dirname(__FILE__) . "/include/offset.php";
$torrent["date"] = date("d/m/Y", $row["data"] - $offset);
if (!$XBT_USE) {
if ($row["speed"] < 0) {
$speed = "N/D";
} else {
if ($row["speed"] > 2097152) {
$speed = round($row["speed"] / 1048576, 2) . " MB/sec";
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:delete.php
注:本文中的bTemplate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论