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


PHP image_or_link函数代码示例

本文整理汇总了PHP中image_or_link函数的典型用法代码示例。如果您正苦于以下问题:PHP image_or_link函数的具体用法?PHP image_or_link怎么用?PHP image_or_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了image_or_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: read_invitations

function read_invitations()
{
    global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings;
    $scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user=" . $CURUSER["uid"] . "&code=" . $CURUSER["random"] . "&do=invitations");
    $addparam = "";
    $res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true);
    $count = $res[0]["invites"];
    list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&");
    $admintpl->set("inv_pagertop", $pagertop);
    $admintpl->set("inv_pagerbottom", $pagerbottom);
    $results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true);
    $invitees = array();
    $i = 0;
    foreach ($results as $id => $data) {
        $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true);
        if (mysql_num_rows($res) > 0) {
            $inviter_name = mysql_result($res, 0, 0);
        } else {
            $inviter_name = 'Unknown';
        }
        $invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&amp;user=" . $data["inviter"] . "\">" . $inviter_name . "</a>";
        $invitees[$i]["invitee"] = unesc($data["invitee"]);
        $invitees[$i]["hash"] = unesc($data["hash"]);
        $invitees[$i]["time_invited"] = $data["time_invited"];
        $invitees[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=invitations&amp;action=delete&amp;id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        $i++;
    }
    $admintpl->set("invitees", $invitees);
    $admintpl->set("language", $language);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:30,代码来源:admin.invitations.php

示例2: faq_read

function faq_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("faq_add", false, true);
    $admintpl->set("language", $language);
    $cres = genrelistfaq('', 'faq_group');
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["title"]);
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("faq", $cres);
    $admintpl->set("faq_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=faq_group&amp;action=add\">" . $language["FAQ_ADD"] . "</a>");
    unset($cres);
}
开发者ID:Karpec,项目名称:gizd,代码行数:15,代码来源:admin.faq.group.php

示例3: category_read

function category_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("category_add", false, true);
    $admintpl->set("language", $language);
    $cres = genrelist();
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["name"]);
        $cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("category_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=add\">" . $language["CATEGORY_ADD"] . "</a>");
    unset($cres);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:16,代码来源:admin.categories.php

示例4: read_styles

function read_styles()
{
    global $TABLE_PREFIX, $language, $CURUSER, $admintpl, $STYLEPATH;
    $sres = style_list();
    for ($i = 0; $i < count($sres); $i++) {
        $res = do_sqlquery("SELECT COUNT(*) FROM {$TABLE_PREFIX}users WHERE style = " . $sres[$i]["id"], true);
        $sres[$i]["style_users"] = mysql_result($res, 0, 0);
        $sres[$i]["style"] = unesc($sres[$i]["style"]);
        $sres[$i]["style_url"] = unesc($sres[$i]["style_url"]);
        $sres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=edit&amp;id=" . $sres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $sres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=delete&amp;id=" . $sres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("style_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("styles", $sres);
    $admintpl->set("style_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=style&amp;action=add\">" . $language["STYLE_ADD"] . "</a>");
    unset($sres);
    mysql_free_result($res);
}
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:19,代码来源:admin.styles.php

示例5: category_read

function category_read()
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("category_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("perm", false, true);
    $admintpl->set("permedit", false, true);
    $cres = genrelist();
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = unesc($cres[$i]["name"]);
        $cres[$i]["perm"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=perm&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["PERMISSIONS"]) . "</a>";
        $cres[$i]["image"] = "<img src=\"{$STYLEURL}/images/categories/" . $cres[$i]["image"] . "\" alt=\"\" border=\"0\" />";
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("category_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=category&amp;action=add\">" . $language["CATEGORY_ADD"] . "</a>");
    $ajax_order = "<script type=\"text/javascript\">\n\t   \t\tfunction updateOrder()\n            {\n                var options = {\n                                method : 'post',\n                                parameters : Sortable.serialize('categories_list'),\n                                onComplete : function(request) {                                \t\n\t\t\t                        new Effect.Highlight(ID.id,{duration:3});\n\t\t\t                        \n\t\t\t                    }\n                              };\n                new Ajax.Request('index.php?page=admin&user=" . $_GET["user"] . "&code=" . $_GET["code"] . "&do=category&action=order', options);\n            }\n  \t Sortable.create('categories_list', { onUpdate : updateOrder });\n\t   \n            \n</script>";
    $admintpl->set('ajax_order', $ajax_order);
    unset($cres);
}
开发者ID:Karpec,项目名称:gizd,代码行数:21,代码来源:admin.categories.php

示例6: unset

unset($ruploaded);
if ($numtorrent > 0) {
    list($pagertop, $pagerbottom, $limit) = pager($utorrents == 0 ? 15 : $utorrents, $numtorrent, "index.php?page=usercp&amp;uid={$uid}&amp;");
    $usercptpl->set("pagertop", $pagertop);
    $resuploaded = do_sqlquery("SELECT f.filename, UNIX_TIMESTAMP(f.data) as added, f.size, {$tseeds} as seeds, {$tleechs} as leechers, {$tcompletes} as finished, f.info_hash as hash FROM {$ttables} WHERE uploader={$uid} ORDER BY data DESC {$limit}", true);
}
if ($resuploaded && mysql_num_rows($resuploaded) > 0) {
    include "include/offset.php";
    $usercptpl->set("RESULTS", true, true);
    $uptortpl = array();
    $i = 0;
    while ($rest = mysql_fetch_assoc($resuploaded)) {
        $uptortpl[$i]["filename"] = cut_string(unesc($rest["filename"]), intval($btit_settings["cut_name"]));
        $uptortpl[$i]["added"] = date("d/m/Y", $rest["added"] - $offset);
        $uptortpl[$i]["size"] = makesize($rest["size"]);
        $uptortpl[$i]["seedcolor"] = linkcolor($rest["seeds"]);
        $uptortpl[$i]["seeds"] = $rest[seeds];
        $uptortpl[$i]["leechcolor"] = linkcolor($rest["leechers"]);
        $uptortpl[$i]["leechers"] = $rest[leechers];
        $uptortpl[$i]["completed"] = $rest["finished"] > 0 ? $rest["finished"] : "---";
        $uptortpl[$i]["editlink"] = "index.php?page=edit&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["dellink"] = "index.php?page=delete&amp;info_hash=" . $rest["hash"] . "&amp;returnto=" . urlencode("index.php?page=torrents") . "";
        $uptortpl[$i]["editimg"] = image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]);
        $uptortpl[$i]["delimg"] = image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]);
        $i++;
    }
    $usercptpl->set("uptor", $uptortpl);
} else {
    $usercptpl->set("RESULTS", false, true);
    $usercptpl->set("pagertop", "");
}
开发者ID:wilian32,项目名称:xbtit,代码行数:31,代码来源:usercp.main.php

示例7: foreach

    $i = 0;
    foreach ($sub_forums as $id => $subfor) {
        $subforums[$i]["status"] = image_or_link("{$STYLEPATH}/images/" . $subfor["img"] . ".png", "", $subfor["img"]);
        $subforums[$i]["name"] = "<a href=\"index.php?page=forum&amp;action=viewforum&amp;forumid=" . $subfor["id"] . "\">" . htmlspecialchars(unesc($subfor["name"])) . "</a>";
        $subforums[$i]["description"] = $subfor["description"] ? "<br />\n" . format_comment(unesc($subfor["description"])) : "";
        $subforums[$i]["topics"] = number_format($subfor["topiccount"]);
        $subforums[$i]["posts"] = number_format($subfor["postcount"]);
        if ($subfor["uid"]) {
            $subforums[$i]["lastpost"] = date("", $subfor["date"]) . "<br />by&nbsp;" . ($subfor["username"] ? "<a href=\"index.php?page=userdetails&amp;id=" . $subfor["uid"] . "\"><b>" . unesc($subfor["username"]) . "</b></a><br />" : $language["MEMBER"] . "[" . $subfor["topicid"] . "]") . "<br />\n" . "in <a href=\"index.php?page=forum&amp;action=viewtopic&amp;topicid=" . $subfor["topicid"] . "&amp;msg=" . $subfor["lastpost"] . "#" . $subfor["lastpost"] . "\">" . htmlspecialchars(unesc($subfor["subject"])) . "</a>";
        } else {
            $subforums[$i]["lastpost"] = $language["NA"];
        }
        $i++;
    }
    $forumtpl->set("forums", $subforums);
    $forumtpl->set("HAS_SUBFORUMS", true, true);
} else {
    $forumtpl->set("HAS_SUBFORUMS", false, true);
}
$forumtpl->set("forum_name", $forumname);
$forumtpl->set("sub_forum_name", $forumname . "'s " . $language["SUBFORUMS"]);
$forumtpl->set("locked_legend", image_or_link("{$STYLEPATH}/images/locked.png", "style='margin-right: 5px'", "locked") . "&nbsp;" . $language["LOCKED"]);
$forumtpl->set("unlocked_legend", image_or_link("{$STYLEPATH}/images/unlocked.png", "style='margin-right: 5px'", "unlocked") . "&nbsp;" . $language["UNLOCKED"]);
$forumtpl->set("locked_new_legend", image_or_link("{$STYLEPATH}/images/lockednew.png", "style='margin-right: 5px'", "lockednew") . "&nbsp;" . $language["LOCKED_NEW"]);
$forumtpl->set("unlocked_new_legend", image_or_link("{$STYLEPATH}/images/unlockednew.png", "style='margin-right: 5px'", "unlockednew") . "&nbsp;" . $language["UNLOCKED_NEW"]);
$forumtpl->set("quick_jump_combo", $quickjmp);
$forumtpl->set("forum_action", "index.php?page=forum&amp;action=newtopic&amp;forumid={$forumid}");
$forumtpl->set("can_create", $user_can_create, true);
unset($topics);
unset($topicarr);
mysql_free_result($topicsres);
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:forum.viewforum.php

示例8: ob_start

// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
ob_start();
if (!defined("IN_BTIT")) {
    die("non direct access!");
}
require_once "include/functions.php";
require_once "include/config.php";
dbconn();
$res = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT id, name , image FROM {$TABLE_PREFIX}categories ORDER BY name");
while ($cat = mysqli_fetch_assoc($res)) {
    if ($cat["image"] == "") {
        $catoptions .= "";
    } else {
        $catoptions .= "<a href=\"index.php?page=torrents&amp;category={$cat['id']}\">" . image_or_link($cat["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $cat["image"], "", $cat["name"]) . "</a><input type=\"checkbox\" name=\"cat[]\" value=\"{$cat['id']}\" " . (strpos($CURUSER['notifs'], "[cat{$cat['id']}]") !== false ? " checked" : "") . "/>";
    }
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
    if (empty($_POST['cat'])) {
        stderr("Error", "You need to chose at least one category !!");
    }
    if (empty($_POST['feed'])) {
        stderr("Error", "You need to chose a feed type !!");
    }
    $link = "{$BASEURL}/rss_torrents.php";
    if ($_POST['feed'] == "dl") {
        $query[] = "feed=dl";
    }
    foreach ($_POST['cat'] as $cat) {
        $query[] = "cat[]={$cat}";
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:index.php

示例9: windowunder

 if ($resu) {
     if ($XBTT_USE) {
         $rowuser["username"] = $row["username"];
         $rowuser["id"] = $row["uid"];
         $rowuser["flagpic"] = $row["flagpic"];
         $rowuser["name"] = $row["name"];
     } else {
         $rowuser = $resu[0];
     }
     if ($rowuser && $rowuser["id"] > 1) {
         if ($GLOBALS["usepopup"]) {
             $peers[$i]["USERNAME"] = "<a href=\"javascript: windowunder('index.php?page=userdetails&amp;id=" . $rowuser["id"] . "')\">" . unesc($rowuser["username"]) . "</a>";
             $peers[$i]["PM"] = "<a href=\"javascript: windowunder('index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid={$CURUSER['uid']}&amp;what=new&amp;to=" . urlencode(unesc($rowuser["username"])) . "')\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
         } else {
             $peers[$i]["USERNAME"] = "<a href=\"index.php?page=userdetails&amp;id=" . $rowuser["id"] . "\">" . unesc($rowuser["username"]) . "</a>";
             $peers[$i]["PM"] = "<a href=\"index.php?page=usercp&amp;do=pm&amp;action=edit&amp;uid=" . $CURUSER["uid"] . "&amp;what=new&amp;to=" . urlencode(unesc($rowuser["username"])) . "\">" . image_or_link("{$STYLEPATH}/images/pm.png", "", "PM") . "</a>";
         }
     } else {
         $peers[$i]["USERNAME"] = $language["GUEST"];
         $peers[$i]["PM"] = "";
     }
 } else {
     $peers[$i]["USERNAME"] = $language["GUEST"];
     $peers[$i]["PM"] = "";
 }
 if ($row["flagpic"] != "" && $row["flagpic"] != "unknown.gif") {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/" . $row["flagpic"] . "\" alt=\"" . unesc($row["name"]) . "\" />";
 } elseif ($rowuser["flagpic"] != "" && !empty($rowuser["flagpic"])) {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/" . $rowuser["flagpic"] . "\" alt=\"" . unesc($rowuser["name"]) . "\" />";
 } else {
     $peers[$i]["FLAG"] = "<img src=\"images/flag/unknown.gif\" alt=\"" . $language["UNKNOWN"] . "\" />";
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:peers.php

示例10: image_or_link

     $gold_picture = $value["gold_picture"];
 }
 $gold = '';
 if ($data['gold'] == 1) {
     $gold = '<img src="gold/' . $silver_picture . '" alt="silver" align="right"/>';
 }
 if ($data['gold'] == 2) {
     $gold = '<img src="gold/' . $gold_picture . '" alt="gold" align="right"/>';
 }
 // Gold/Silver Torrent v 1.2 by Losmi / end
 if ($GLOBALS["usepopup"]) {
     echo "\n\t<td width=\"55%\" class=\"lista\" style=\"padding-left:10px;\"><a class=\"lasttor\" href=\"javascript:popdetails('index.php?page=torrent-details&amp;id=" . $data['hash'] . "');\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $filename . "</a>" . $gold . ($data["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
 } else {
     echo "\n\t<td width=\"55%\" class=\"lista\" style=\"padding-left:10px;\"><a class=\"lasttor\" href=\"index.php?page=torrent-details&amp;id=" . $data['hash'] . "\" title=\"" . $language["VIEW_DETAILS"] . ": " . $data["filename"] . "\">" . $filename . "</a>" . $gold . ($data["external"] == "no" ? "" : " (<span style=\"color:red\">EXT</span>)") . "</td>";
 }
 echo "\n\t<td align=\"center\" class=\"lista\" width=\"45\" style=\"text-align: center;\"><a class=\"lasttor\" href=\"index.php?page=torrents&amp;category={$data['catid']}\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $data["image"], "", $data["cname"]) . "</a></td>";
 //waitingtime
 // only if current user is limited by WT
 if (max(0, $CURUSER["WT"]) > 0) {
     $wait = 0;
     // $resuser=do_sqlquery("SELECT * FROM {$TABLE_PREFIX}users WHERE id=".$CURUSER["uid"]);
     // $rowuser=mysql_fetch_array($resuser);
     if (max(0, $CURUSER['downloaded']) > 0) {
         $ratio = number_format($CURUSER['uploaded'] / $CURUSER['downloaded'], 2);
     } else {
         $ratio = 0.0;
     }
     // $res2 = do_sqlquery("SELECT * FROM {$TABLE_PREFIX}files WHERE info_hash='".$data["hash"]."'");
     // $added = mysql_fetch_array($res2);
     $vz = $data['added'];
     //sql_timestamp_to_unix_timestamp($data["data"]);
开发者ID:fchypzero,项目名称:cybyd,代码行数:31,代码来源:lasttorrents_block.php

示例11: do_sqlquery

     $sql = $full . " WHERE moder!='ok'";
     $row = do_sqlquery($sql, true);
     if (mysql_num_rows($row) > 0) {
         $selecting = "<table border=\"1\">";
         $selecting .= "<tr><td align=\"center\"><b>Mod.</b></td><td align=\"center\"><b>Cat.</b></td><td align=\"center\"><b>Name<b></td><td align=\"center\"><b>Dl<b></td><td align=\"center\"><b>Uploader</b></td></tr>";
         while ($data = mysql_fetch_array($row)) {
             if ($CURUSER['edit_torrents'] == "yes") {
                 $link = "edit&info_hash";
             } else {
                 $link = "moder&edit";
             }
             $selecting .= "<tr>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=" . $link . "=" . $data["info_hash"] . "\" title=\"" . $data["moder"] . "\"><img alt=\"" . $data["moder"] . "\" src=\"images/mod/" . $data["moder"] . ".png\"></a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=torrents&category={$data['catid']}\" title=\"" . $data["cname"] . "\">" . image_or_link($data["image"] == "" ? "" : "{$STYLEPATH}/images/categories/" . $data["image"], "", $data["cname"]) . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=torrent-details&id=" . $data['info_hash'] . "\">" . $data['filename'] . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"download.php?id=" . $data["info_hash"] . "&f=" . urlencode($data["filename"]) . ".torrent\" title=\"" . $data["filename"] . "\">" . image_or_link("images/download.gif", "", "torrent") . "</a></td>";
             $selecting .= "<td align=\"center\"><a href=\"index.php?page=userdetails&id=" . $data['upname'] . "\">" . $data['uploader'] . "</a></td>";
             $selecting .= "</tr>";
         }
         $selecting .= "</table>";
     } else {
         $selecting = "No torrents unmodered.<br>";
     }
     $torrenttpl->set("selecting", $selecting);
     $torrenttpl->set("return", "index.php?page=torrents");
 }
 $torrenttpl->set("CHECK", $check, TRUE);
 $torrenttpl->set("CHECK2", $check2, TRUE);
 $torrenttpl->set("CHECK3", $check3, TRUE);
 $torrenttpl->set("CHECK4", $check4, TRUE);
 $torrenttpl->set("CHECK5", $check5, TRUE);
开发者ID:r4kib,项目名称:cyberfun-xbtit,代码行数:31,代码来源:moder.php

示例12: dirname

<?php

//Torrent RSS by DiemThuy ( jul 2012 ) TBDEV conversion with some improvements; Adapated by Yupy for BtiTracker...
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'functions.php';
dbconn();
if (user::$current['view_torrents'] == 'yes') {
    standardheader('RSS');
    $res = $db->query("SELECT id, name, image FROM categories ORDER BY name");
    while ($cat = $res->fetch_assoc()) {
        if ($cat['image'] == '') {
            $catoptions .= '';
        } else {
            $catoptions .= "<a href='torrents.php?category=" . $cat['id'] . "'>" . image_or_link($cat['image'] == '' ? '' : "{$STYLEPATH}/images/categories/" . $cat['image'], '', security::html_safe($cat['name'])) . "</a><input type='checkbox' name='cat[]' value='" . (int) $cat['id'] . "' " . (strpos($CURUSER['notifs'], "[cat{$cat['id']}]") !== false ? " checked" : '') . "/>";
        }
    }
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (empty($_POST['cat'])) {
            stderr('Error', 'You need to chose at least one Category !');
        }
        if (empty($_POST['feed'])) {
            stderr('Error', 'You need to chose a feed type !');
        }
        $link = $BASEURL . '/rss_torrents.php';
        if ($_POST['feed'] == 'dl') {
            $query[] = 'feed=dl';
        }
        foreach ($_POST['cat'] as $cat) {
            $query[] = 'cat[]=' . $cat;
        }
        $query[] = 'pid=' . user::$current['pid'];
        $queries = implode('&', $query);
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:31,代码来源:get_rss.php

示例13: rules_read

function rules_read($search = '')
{
    global $admintpl, $language, $STYLEURL, $CURUSER, $STYLEPATH;
    $admintpl->set("rules_add", false, true);
    $admintpl->set("language", $language);
    $admintpl->set("groups", cat_combo_search($_POST['rules_id']));
    $append = '';
    if (strlen($search) > 0 && strlen($_POST['rules_id']) > 0) {
        $append = " AND cat_id = " . sqlesc($_POST['rules_id']) . "";
        $admintpl->set("frm_action", "index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=serch");
    }
    $cres = genrelistrules($append);
    for ($i = 0; $i < count($cres); $i++) {
        $cres[$i]["name"] = format_comment(unesc($cres[$i]["text"]));
        $cres[$i]["sort_index"] = unesc($cres[$i]["sort_index"]);
        $cres[$i]["id"] = unesc($cres[$i]["id"]);
        $cres[$i]["group_name"] = unesc(getGroup($cres[$i]["cat_id"]));
        $cres[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=edit&amp;id=" . $cres[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $cres[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=delete&amp;id=" . $cres[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
    }
    $admintpl->set("categories", $cres);
    $admintpl->set("rules_add_new", "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=add\">" . $language["RULES_ADD"] . "</a>");
    unset($cres);
}
开发者ID:wilian32,项目名称:xbtit,代码行数:24,代码来源:admin.rules.php

示例14: COUNT

        $lasttopic = security::html_safe(unesc($topic_arr['subject']));
        //---- Get reply count
        $postsperpage = user::$current["postsperpage"] > 0 ? user::$current["postsperpage"] : 15;
        $res = $db->query("SELECT COUNT(*) FROM posts WHERE topicid = " . $lasttopicid) or sqlerr(__FILE__, __LINE__);
        $arr = $res->fetch_row();
        $posts = (int) $arr[0];
        $tpages = floor($posts / $postsperpage);
        if ($tpages * $postsperpage != $posts) {
            ++$tpages;
        }
        for ($i = 1; $i <= $tpages; ++$i) {
            $postpages = "<a href='?action=viewtopic&topicid=" . $lasttopicid . "&page=" . $i . "#" . $lastpostid . "'><b>" . $lasttopic . "</b></a>";
        }
        $lastpost = "<nobr>" . $lastpostdate . "<br />" . "by <a href='userdetails.php?id=" . $lastposterid . "'><b>" . $lastposter . "</b></a><br />" . "in " . $postpages . "</nobr>";
        $r = $db->query("SELECT lastpostread FROM readposts WHERE userid = " . user::$current["uid"] . " AND topicid = " . $lasttopicid) or sqlerr(__FILE__, __LINE__);
        $a = $r->fetch_row();
        if ($a && $a[0] >= $lastpostid) {
            $img = "unlocked";
        } else {
            $img = "unlockednew";
        }
    } else {
        $lastpost = "N/A";
        $img = "unlocked";
    }
    print "<tr><td class='lista' align='left'><table border='0' cellspacing='0' cellpadding='0'><tr><td class='embedded' style='padding-right: 5px'>" . image_or_link($STYLEPATH . "/" . $img . ".png", "", $img) . "</td><td class='embedded'><a href='?action=viewforum&forumid=" . $forumid . "'><b>" . $forumname . "</b></a><br />\n" . "" . $forumdescription . "</td></tr></table></td><td class='lista' align='center'>" . $topiccount . "</td><td class='lista' align='center'>" . $postcount . "</td>" . "<td class='lista' align='center'>" . $lastpost . "</td></tr>\n";
}
print "</table>\n";
print "<p align='center'><a href='?action=search'><b>" . SEARCH . "</b></a> | <a href='?action=viewunread'><b>" . VIEW_UNREAD . "</b></a> | <a href='?catchup'><b>" . CATCHUP . "</b></a></p>";
block_end();
stdfoot();
开发者ID:Q8HMA,项目名称:BtiTracker-1.5.1,代码行数:31,代码来源:forum.php

示例15: substr

            $don8 = '<font color = red>none yet</font>';
        } else {
            $don8 = "<font color = green>" . substr($arr['donate_date_8'], 8, -9) . "-" . substr($arr['donate_date_8'], 5, -12) . "-" . substr($arr['donate_date_8'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_8'] . $unit . "</font>";
        }
        if ($arr['donate_date_9'] == '0000-00-00 00:00:00') {
            $don9 = '<font color = red>none yet</font>';
        } else {
            $don9 = "<font color = green>" . substr($arr['donate_date_9'], 8, -9) . "-" . substr($arr['donate_date_9'], 5, -12) . "-" . substr($arr['donate_date_9'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_9'] . $unit . "</font>";
        }
        if ($arr['donate_date_10'] == '0000-00-00 00:00:00') {
            $don10 = '<font color = red>none yet</font>';
        } else {
            $don10 = "<font color = green>" . substr($arr['donate_date_10'], 8, -9) . "-" . substr($arr['donate_date_10'], 5, -12) . "-" . substr($arr['donate_date_10'], 0, 4) . "<font color = purple><br> " . $arr['don_ation_10'] . $unit . "</font>";
        }
        $donation[$i]["Username"] = "<a href=index.php?page=userdetails&id=" . $arr["id"] . ">" . $namee . "</a>";
        $donation[$i]["id"] = $arr["don_id"];
        $donation[$i]["a"] = $don;
        $donation[$i]["b"] = $don1;
        $donation[$i]["c"] = $don2;
        $donation[$i]["d"] = $don3;
        $donation[$i]["e"] = $don4;
        $donation[$i]["f"] = $don5;
        $donation[$i]["g"] = $don6;
        $donation[$i]["h"] = $don7;
        $donation[$i]["i"] = $don8;
        $donation[$i]["j"] = $don9;
        $donation[$i]["edit"] = "<a href=\"index.php?page=admin&amp;user=" . $CURUSER["uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=don_edit&amp;id=" . $donation[$i]["id"] . "\">" . image_or_link("{$STYLEPATH}/images/edit.png", "", $language["EDIT"]) . "</a>";
        $i++;
    }
}
$admintpl->set("donation", $donation);
开发者ID:Karpec,项目名称:gizd,代码行数:31,代码来源:admin.don_hist.php


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