当前位置: 首页>>代码示例>>PHP>>正文


PHP bTemplate::set方法代码示例

本文整理汇总了PHP中bTemplate::set方法的典型用法代码示例。如果您正苦于以下问题:PHP bTemplate::set方法的具体用法?PHP bTemplate::set怎么用?PHP bTemplate::set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bTemplate的用法示例。


在下文中一共展示了bTemplate::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: intval

                    if ($sr >= 0.25) {
                        $s = "images/smilies/sad.gif";
                    } else {
                        $s = "images/smilies/thumbsdown.gif";
                    }
                }
            }
        }
    }
    $ratio = number_format($sr, 2) . "&nbsp;&nbsp;<img src=\"{$s}\" alt=\"\" />";
} else {
    $ratio = '&#8734;';
}
$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", "&nbsp;&nbsp;&nbsp;<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid=" . $CURUSER["uid"] . "&amp;what=new&amp;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", "&nbsp;&nbsp;&nbsp<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=edit&amp;uid={$id}&amp;returnto=index.php?page=userdetails&amp;id={$id}\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>");
}
if ($CURUSER["delete_users"] == "yes" && $id != $CURUSER["uid"]) {
    $userdetailtpl->set("userdetail_delete", "&nbsp;&nbsp;&nbsp<a onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\" href=index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=users&amp;action=delete&amp;uid={$id}&amp;smf_fid=" . $row["smf_fid"] . "&amp;returnto=" . urlencode("index.php?page=users") . ">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>");
}
$userdetailtpl->set("userdetail_has_avatar", $row["avatar"] && $row["avatar"] != "", TRUE);
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:userdetails.php

示例3: load_language

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']);
        }
        if ($resu) {
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:peers.php

示例4: load_language

//
////////////////////////////////////////////////////////////////////////////////////
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: load_language

// 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']);
        if (is_array($activedays) and count($activedays) and 5 < strlen($activetime) and 2 < strlen($genre)) {
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:dj.php

示例6: 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.
//
////////////////////////////////////////////////////////////////////////////////////
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) {
    $catdropdown .= "<option value=\"" . $cat["id"] . "\"";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:expected.php

示例7: sqlerr

            $autor = sanitize_paranoid_string($autor);
            do_sqlquery("UPDATE {$TABLE_PREFIX}subtitles SET name='{$nume}', hash='{$hash}', pic='{$pic}', cds='{$cds}', author='{$autor}', imdb='{$link}', Framerate='{$frame}', flag='{$idflag}' WHERE id=" . $_GET['id']) or sqlerr();
            redirect("index.php?page=subtitles");
        }
    }
    $getname = do_sqlquery("select * from {$TABLE_PREFIX}countries where id=" . $arr["flag"]);
    $named = mysqli_fetch_assoc($getname);
    $fres = flag_list();
    $option = "\n<select name=\"flag\" size=\"1\">\n<option value='" . $arr["flag"] . "'>" . $named["name"] . "</option>";
    $thisip = $_SERVER["REMOTE_ADDR"];
    $remotedns = gethostbyaddr($thisip);
    if ($remotedns != $thisip) {
        $remotedns = strtoupper($remotedns);
        preg_match('/^(.+)\\.([A-Z]{2,3})$/', $remotedns, $tldm);
        if (isset($tldm[2])) {
            $remotedns = mysqli_real_escape_string($DBDT, $tldm[2]);
        }
    }
    foreach ($fres as $flag) {
        $option .= "\n<option ";
        if ($flag["id"] == $dati["flag"] || $flag["domain"] == $remotedns && $action == "signup") {
            $option .= "\"selected\" ";
        }
        $option .= "value=\"" . $flag["id"] . "\">" . $flag["name"] . "</option>";
    }
    $option .= "\n</select>";
    $upform = "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"index.php?page=subedit&action=edit&save=1&id={$id}\">\n\n<p>&nbsp;</p>\n\n<table width=\"349\" border=\"0\" align=\"center\">\n<tr><td class=block colspan=4>&nbsp;</td></tr><tr>\n\n  <tr>\n\n    <td class=header width=\"95\">" . $language['SUB_NAME'] . "</td>\n\n    <td class=lista width=\"244\"><input name=\"nume\" type=\"text\" id=\"nume\" size=\"40\" value=\"" . $arr[name] . "\"></td>\n\n  </tr>\n   <tr>\n\n    <td class=header width=\"95\">" . $language['SUB_HASH'] . "</td>\n\n    <td class=lista width=\"244\"><input name=\"hash\" type=\"text\" id=\"hash\" size=\"40\" value=\"" . $arr[hash] . "\"></td>\n\n  </tr>\n\n  <tr>\n\n    <td class=header>" . $language['SUB_IMDB'] . "</td>\n\n    <td class=lista><input name=\"link\" type=\"text\" id=\"link\" size=\"40\" value=\"" . $arr[imdb] . "\"></td>\n\n  </tr>\n       <tr>\n\n       <td align=\"left\" class=\"header\">" . $language['SUB_LANG'] . "</td>\n\n       <td align=\"left\" class=\"lista\">" . $option . "</td>\n\n    </tr>\n\n  <tr>\n\n    <td class=header>" . $language['SUB_IMG'] . "</td>\n\n    <td class=lista><input name=\"pic\" type=\"text\" id=\"pic\" size=\"40\" value=\"" . $arr[pic] . "\"></td>\n\n  </tr>\n\n  <tr>\n\n    <td class=header><label for=\"checkbox_row_6\">" . $language['SUB_FR'] . "</label>\n\n      :</td>\n\n    <td class=lista><input name=\"frame\" type=\"text\" id=\"frame\" size=\"10\" value=\"" . $arr[Framerate] . "\"></td>\n\n  </tr>\n\n  <tr>\n\n    <td class=header>" . $language['SUB_CD'] . "</td>\n\n    <td class=lista><input name=\"cds\" type=\"text\" id=\"cds\" size=\"10\" value=\"" . $arr[cds] . "\"></td>\n\n  </tr>\n\n  <tr>\n\n    <td class=header><label for=\"checkbox_row_10\">" . $language['SUB_AUTH'] . "</label></td>\n\n    <td class=lista><input name=\"author\" type=\"text\" id=\"author\" size=\"40\" value=\"" . $arr[author] . "\"></td>\n\n  </tr>\n\n \n\n</table>\n\n\n\n<p align=\"center\">\n\n  <input name=\"crk\" type=\"hidden\" id=\"crk\" value=\"100\" />\n\n  <input class=btn name=\"Submit\" type=\"submit\" id=\"Submit\" value=\"" . $language['SUB'] . "\" />&nbsp; " . $language['SUBCANCEL'] . "\n\n</p>\n\n</form>";
}
$endp = "</p>";
$subsedittpl->set("upform", $upform);
$subsedittpl->set("endp", $endp);
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:subs_edit.php

示例8: bTemplate

    }
} 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);
/*
Mod by losmi -sticky torrent
*/
/*
Mod by losmi -visible torrent
*/
$query = "SELECT * FROM {$TABLE_PREFIX}visible";
$rez = do_sqlquery($query, true);
$rez = mysql_fetch_assoc($rez);
$rez_level = $rez['level'];
$current_level = getLevelVisible($CURUSER['id_level']);
开发者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 . "&amp;" . $addparams . (strlen($addparam) > 0 ? "&amp;" : "") . "order={$order_param}&amp;by={$by_param}&amp;");
 if ($by == "ASC") {
     $mark = "&nbsp;&uarr;";
 } else {
     $mark = "&nbsp;&darr;";
 }
 // 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\" " : "");
 $userstpl->set("view_client_search", $CURUSER["edit_users"] == "yes" ? TRUE : FALSE, TRUE);
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:users.php

示例10: bTemplate

//   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

    }
    global $language, $newstpl;
    $newstpl = new bTemplate();
    $newstpl->set("language", $language);
    $newstpl->set("ADD_EDIT", true, true);
    $tplnews = array();
    $tplnews["action"] = "index.php?page=news&amp;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&amp;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"];
            $title = $_POST["title"];
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:news.php

示例13: bTemplate

        $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 = "";
    }
    //Invalid Login System
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:login.php

示例14: load_language

// 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&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=featured&amp;action=save&amp;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 {
            $query = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT info_hash, filename from {$TABLE_PREFIX}files where image!='' ORDER BY data DESC limit 15");
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:admin.featured.php

示例15: AddSlashes

     $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);
     }
     // Upload Multiplier
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:edit.php


注:本文中的bTemplate::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。