コード例 #1
0
function usercommenttable($rows)
{
    global $CURUSER, $pic_base_url, $userid;
    begin_main_frame();
    begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        echo "<p class=sub>#" . $row["id"] . " by ";
        if (isset($row["username"])) {
            $title = $row["title"];
            if ($title == "") {
                $title = get_user_class_name($row["class"]);
            } else {
                $title = safeChar($title);
            }
            echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . safeChar($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$pic_base_url}star.gif\" alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "\"{$pic_base_url}warned.gif\" alt=\"Warned\">" : "") . " ({$title})\n";
        } else {
            echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n";
        }
        echo " at " . $row["added"] . " GMT" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=edit&amp;cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&amp;cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&amp;cid={$row['id']}>View original</a>]" : "") . "</p>\n";
        $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : "";
        $text = format_comment($row["text"]);
        if ($row["editedby"]) {
            $text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a> at {$row['editedat']} GMT</font></p>\n";
        }
        begin_table(true);
        echo "<tr valign=top>\n";
        echo "<td align=center width=150 style='padding: 0px'><img width=150 src=\"{$avatar}\"></td>\n";
        echo "<td class=text>{$text}</td>\n";
        echo "</tr>\n";
        end_table();
    }
    end_frame();
    end_main_frame();
}
コード例 #2
0
function commenttable($rows, $redaktor = "comment")
{
    global $CURUSER, $avatar_max_width;
    $count = 0;
    foreach ($rows as $row) {
        if ($row["downloaded"] > 0) {
            $ratio = $row['uploaded'] / $row['downloaded'];
            $ratio = number_format($ratio, 2);
        } elseif ($row["uploaded"] > 0) {
            $ratio = "Inf.";
        } else {
            $ratio = "---";
        }
        if (strtotime($row["last_access"]) > gmtime() - 600) {
            $online = "online";
            $online_text = "В сети";
        } else {
            $online = "offline";
            $online_text = "Не в сети";
        }
        print "<table class=maibaugrand width=100% border=1 cellspacing=0 cellpadding=3>";
        print "<tr><td class=colhead align=\"left\" colspan=\"2\" height=\"24\">";
        if (isset($row["username"])) {
            $title = $row["title"];
            if ($title == "") {
                $title = get_user_class_name($row["class"]);
            } else {
                $title = htmlspecialchars_uni($title);
            }
            print ":: <img src=\"pic/buttons/button_" . $online . ".gif\" alt=\"" . $online_text . "\" title=\"" . $online_text . "\" style=\"position: relative; top: 2px;\" border=\"0\" height=\"14\">" . " <a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . " class=altlink_white><b>" . get_user_class_color($row["class"], htmlspecialchars_uni($row["username"])) . "</b></a> ::" . ($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=\"/pic/warned.gif\" alt=\"Warned\">" : "") . " {$title} ::\n" . " <img src=\"pic/upl.gif\" alt=\"upload\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["uploaded"]) . " :: <img src=\"pic/down.gif\" alt=\"download\" border=\"0\" width=\"12\" height=\"12\"> " . mksize($row["downloaded"]) . " :: <font color=\"" . get_ratio_color($ratio) . "\">{$ratio}</font> :: ";
        } else {
            print "<a name=\"comm" . $row["id"] . "\"><i>[Anonymous]</i></a>\n";
        }
        $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars_uni($row["avatar"]) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.gif";
        }
        if (md5($row['text']) == $row['text_hash']) {
            $text = $row['text_parsed'];
        } else {
            $text = format_comment($row['text']);
            sql_query('INSERT INTO comments_parsed (cid, text_hash, text_parsed) VALUES (' . implode(', ', array_map('sqlesc', array($row['id'], md5($row['text']), $text))) . ')') or sqlerr(__FILE__, __LINE__);
        }
        if ($row["editedby"]) {
            //$res = mysql_fetch_assoc(sql_query("SELECT * FROM users WHERE id = $row[editedby]")) or sqlerr(__FILE__,__LINE__);
            $text .= "<p><font size=1 class=small>Последний раз редактировалось <a href=userdetails.php?id={$row['editedby']}><b>{$row['editedbyname']}</b></a> в {$row['editedat']}</font></p>\n";
        }
        print "</td></tr>";
        print "<tr valign=top>\n";
        print "<td style=\"padding: 0px; width: 5%;\" align=\"center\"><img src={$avatar} width=\"{$avatar_max_width}\"> </td>\n";
        print "<td width=100% class=text>";
        //print("<span style=\"float: right\"><a href=\"#top\"><img title=\"Top\" src=\"pic/top.gif\" alt=\"Top\" border=\"0\" width=\"15\" height=\"13\"></a></span>");
        print "{$text}</td>\n";
        print "</tr>\n";
        print "<tr><td class=colhead align=\"center\" colspan=\"2\">";
        print "<div style=\"float: left; width: auto;\">" . ($CURUSER ? " [<a href=\"" . $redaktor . ".php?action=quote&amp;cid={$row['id']}\" class=\"altlink_white\">Цитата</a>]" : "") . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? " [<a href=" . $redaktor . ".php?action=edit&amp;cid={$row['id']} class=\"altlink_white\">Изменить</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=delete&amp;cid={$row['id']}\" class=\"altlink_white\">Удалить</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? " [<a href=\"" . $redaktor . ".php?action=vieworiginal&amp;cid={$row['id']}\" class=\"altlink_white\">Оригинал</a>]" : "") . (get_user_class() >= UC_MODERATOR ? " IP: " . ($row["ip"] ? "<a href=\"usersearch.php?ip={$row['ip']}\" class=\"altlink_white\">" . $row["ip"] . "</a>" : "Неизвестен") : "") . "</div>";
        print "<div align=\"right\"><!--<font size=1 class=small>-->Комментарий добавлен: " . $row["added"] . " GMT<!--</font>--></td></tr>";
        print "</table><br>";
    }
}
コード例 #3
0
function commenttable_new($rows)
{
    global $CURUSER, $HTTP_SERVER_VARS;
    begin_main_frame();
    begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        $subres = mysql_query("SELECT name from torrents where id=" . unsafeChar($row["torrent"])) or sqlerr(__FILE__, __LINE__);
        $subrow = mysql_fetch_array($subres);
        print "<br /><a href=\"details.php?id=" . safeChar($row["torrent"]) . "\">" . safeChar($subrow["name"]) . "</a><br />\n";
        print "<p class=sub>#" . $row["id"] . " by ";
        if (isset($row["username"])) {
            print "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safechar($row["username"]) . "</b></a>" . ($row["warned"] == "yes" ? "<img src=" . "pic/warned.gif alt=\"Warned\">" : "");
        } else {
            print "<a name=\"comm" . safeChar($row["id"]) . "\"><i>(orphaned)</i></a>\n";
        }
        print " at " . safeChar($row["added"]) . " GMT" . "- [<a href=comment.php?action=edit&cid={$row['id']}>Edit</a>]" . "- [<a href=deletecomment.php?id={$row['id']}>Delete</a>]</p>\n";
        $avatar = $CURUSER["avatars"] == "yes" ? safechar($row["avatar"]) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.gif";
        }
        begin_table(true);
        print "<tr valign=top>\n";
        print "<td align=center width=150 style='padding: 0px'><img width=150 src={$avatar}></td>\n";
        print "<td class=text>" . format_comment($row["text"]) . "</td>\n";
        print "</tr>\n";
        end_table();
    }
    end_frame();
    end_main_frame();
}
コード例 #4
0
ファイル: user_functions.php プロジェクト: Bigjoos/U-232-V5
function autoshout($msg)
{
    global $INSTALLER09, $mc1;
    require_once INCL_DIR . 'bbcode_functions.php';
    sql_query('INSERT INTO shoutbox(userid,date,text,text_parsed,autoshout)VALUES (' . $INSTALLER09['bot_id'] . ',' . TIME_NOW . ',' . sqlesc($msg) . ',' . sqlesc(format_comment($msg)) . ', "yes")');
    $mc1->delete_value('auto_shoutbox_');
}
コード例 #5
0
ファイル: tags.php プロジェクト: herrag33k/TomTorrent
function insert_tag($name, $description, $syntax, $example, $remarks)
{
	$result = format_comment($example);
	echo '<p class="sub"><b>'.$name.'</b></p>'."\n";
	echo '<table class="main" width="100%" border="1" cellspacing="0" cellpadding="5">'."\n";
	echo '<tr valign="top"><td width="25%">Lýsing:</td><td>'.$description."\n";
	echo '<tr valign="top"><td>Kóði:</td><td><tt>'.$syntax.'</tt>'."\n";
	echo '<tr valign="top"><td>Dæmi:</td><td><tt>'.$example.'</tt>'."\n";
	echo '<tr valign="top"><td>Úr því kemur:</td><td>'.$result."\n";
	if ($remarks != '')
		echo '<tr><td>Athugasemdir:</td><td>'.$remarks."\n";
	echo '</table>'."\n";
}
コード例 #6
0
ファイル: tags.php プロジェクト: lavanoid/TorrentTrader3
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    $result = format_comment($example);
    print "<p><b>{$name}</b></p>\n";
    print "<table width='100%' border='1' cellspacing='0' cellpadding='3'>\n";
    print "<tr valign='top'><td width='25%'>" . T_("DESCRIPTION") . ":</td><td>{$description}</td></tr>\n";
    print "<tr valign='top'><td>" . T_("SYNTAX") . ":</td><td><span class='teletype'>{$syntax}</span></td></tr>\n";
    print "<tr valign='top'><td>" . T_("EXAMPLE") . ":</td><td><span class='teletype'>{$example}</span></td></tr>\n";
    print "<tr valign='top'><td>" . T_("RESULT") . ":</td><td>{$result}</td></tr>\n";
    if ($remarks != "") {
        print "<tr><td>" . T_("REMARKS") . ":</td><td>{$remarks}</td></tr>\n";
    }
    print "</table>\n";
}
コード例 #7
0
ファイル: tags.php プロジェクト: klldll/tbdev
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    $result = format_comment($example);
    print "<p class=sub><b>{$name}</b></p>\n";
    print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n";
    print "<tr valign=top><td width=25%>Описание:</td><td>{$description}\n";
    print "<tr valign=top><td>Синтаксис:</td><td><tt>{$syntax}</tt>\n";
    print "<tr valign=top><td>Пример:</td><td><tt>{$example}</tt>\n";
    print "<tr valign=top><td>Результат:</td><td>{$result}\n";
    if ($remarks != "") {
        print "<tr><td>Примечание:</td><td>{$remarks}\n";
    }
    print "</table>\n";
}
コード例 #8
0
ファイル: tags.php プロジェクト: ZenoX2012/CyBerFuN-CoDeX
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    $result = format_comment($example);
    print "<p class=sub><b>{$name}</b></p>\n";
    print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n";
    print "<tr valign=top><td width=25%>Description:</td><td>{$description}\n";
    print "<tr valign=top><td>Syntax:</td><td><tt>{$syntax}</tt>\n";
    print "<tr valign=top><td>Example:</td><td><tt>{$example}</tt>\n";
    print "<tr valign=top><td>Result:</td><td>{$result}\n";
    if ($remarks != "") {
        print "<tr><td>Remarks:</td><td>{$remarks}\n";
    }
    print "</table>\n";
}
コード例 #9
0
ファイル: tags.php プロジェクト: CtrlSystem/biotorrents
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    $result = format_comment($example);
    print "<div class='sub'><b>{$name}</b></div>\n";
    print "<table class='main' width='100%' border='1' cellspacing='0' cellpadding='5'>\n";
    print "<tr valign='top'><td width='25%'>Description:</td><td>{$description}</td></tr>\n";
    print "<tr valign='top'><td>Syntax:</td><td><tt>{$syntax}</tt></td></tr>\n";
    print "<tr valign='top'><td>Example:</td><td><tt>{$example}</tt></td></tr>\n";
    print "<tr valign='top'><td>Result:</td><td>{$result}</td></tr>\n";
    if ($remarks != "") {
        print "<tr><td>Remarks:</td><td>{$remarks}</td></tr>\n";
    }
    print "</table>\n";
}
コード例 #10
0
ファイル: tags.php プロジェクト: chenrizhi/mtpt
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    global $lang_tags;
    $result = format_comment($example);
    print "<p class=sub><b>{$name}</b></p>\n";
    print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n";
    print "<tr valign=top><td width=25%>" . $lang_tags['text_description'] . "</td><td>{$description}\n";
    print "<tr valign=top><td>" . $lang_tags['text_syntax'] . "</td><td><tt>{$syntax}</tt>\n";
    print "<tr valign=top><td>" . $lang_tags['text_example'] . "</td><td><tt>{$example}</tt>\n";
    print "<tr valign=top><td>" . $lang_tags['text_result'] . "</td><td>{$result}\n";
    if ($remarks != "") {
        print "<tr><td>" . $lang_tags['text_remarks'] . "</td><td>{$remarks}\n";
    }
    print "</table>\n";
}
コード例 #11
0
ファイル: reqdetails.php プロジェクト: herrag33k/TomTorrent
function reqcommenttable($rows)
{
	global $CURUSER, $HTTP_SERVER_VARS;
	begin_main_frame();
	begin_frame();
	$count = 0;

	foreach ($rows as $row) {
		print("<p class=sub>#" . $row["id"] . " bY: ");
		if (isset($row["username"])) {
			$username = $row["username"];
			$ratres = mysql_query("SELECT uploaded, downloaded FROM users WHERE username='******'");
			$rat = mysql_fetch_array($ratres);
			if ($rat["downloaded"] > 0) {
				$ratio = $rat['uploaded'] / $rat['downloaded'];
				$ratio = number_format($ratio, 3);
				$color = get_ratio_color($ratio);
				if ($color)
					$ratio = "<font color=$color>$ratio</font>";
			} else
				if ($rat["uploaded"] > 0)
					$ratio = "Inf.";
				else
					$ratio = "---";

			$title = $row["title"];
			if ($title == "")
				$title = get_user_class_name($row["class"]);
			else
				$title = htmlspecialchars($title);
			print("<a name=comm".$row["id"]." href=userdetails.php?id=".$row["user"]."><b>".htmlspecialchars($row["username"])."</b></a>".($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "").($row["warned"] == "yes" ? "<img src="."/pic/warned.gif alt=\"Warned\">" : "")." ($title) (Ratio: $ratio)\n");
		} else
			print("<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n");
		print(" at " . $row["added"] . " GMT" .($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=edit&amp;cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&amp;cid=$row[id]>Delete</a>]" : "") . "</p>\n");$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
		if (!$avatar)
			$avatar = "/pic/default_avatar.gif";
		$text = format_comment($row["text"]);
		begin_table(true);
		print("<tr valign=top>\n");
		print("<td align=center width=150 style='padding: 0px'><img width=150 src=$avatar></td>\n");
		print("<td class=text>$text</td>\n");
		print("</tr>\n");
		end_table();
	}
	end_frame();
	end_main_frame();
}
コード例 #12
0
ファイル: tags.php プロジェクト: CharlieHD/U-232-V2
function insert_tag($name, $description, $syntax, $example, $remarks)
{
    global $lang;
    $result = format_comment($example);
    $htmlout = '';
    $htmlout .= "<div class='sub'><b>{$name}</b></div>\n";
    $htmlout .= "<table class='main' width='100%' border='1' cellspacing='0' cellpadding='5'>\n";
    $htmlout .= "<tr valign='top'><td width='25%'>{$lang['tags_description']}</td><td>{$description}</td></tr>\n";
    $htmlout .= "<tr valign='top'><td>{$lang['tags_systax']}</td><td><tt>{$syntax}</tt></td></tr>\n";
    $htmlout .= "<tr valign='top'><td>{$lang['tags_example']}</td><td><tt>{$example}</tt></td></tr>\n";
    $htmlout .= "<tr valign='top'><td>{$lang['tags_result']}</td><td>{$result}</td></tr>\n";
    if ($remarks != "") {
        $htmlout .= "<tr><td>{$lang['tags_remarks']}</td><td>{$remarks}</td></tr>\n";
    }
    $htmlout .= "</table>\n";
    return $htmlout;
}
コード例 #13
0
function usercommenttable($rows)
{
    $htmlout = '';
    global $CURUSER, $INSTALLER09, $userid, $lang;
    $htmlout .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'>";
    $htmlout .= begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        $htmlout .= "<p class='sub'>#" . (int) $row["id"] . " by ";
        if (isset($row["username"])) {
            $title = $row["title"];
            if ($title == "") {
                $title = get_user_class_name($row["class"]);
            } else {
                $title = htmlsafechars($title);
            }
            $htmlout .= "<a name='comm" . (int) $row['id'] . "' href='userdetails.php?id=" . (int) $row['user'] . "'><b>" . htmlsafechars($row['username']) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$INSTALLER09['pic_base_url']}star.gif\" alt='{$lang['userdetails_donor']}' />" : "") . ($row["warned"] >= "1" ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"{$lang['userdetails_warned']}\" />" : "") . " ({$title})\n";
        } else {
            $htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>{$lang['userdetails_orphaned']}</i></a>\n";
        }
        $htmlout .= " " . get_date($row["added"], 'DATE', 0, 1) . "" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=edit&amp;cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&amp;cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&amp;cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_voriginal']}</a>]" : "") . "</p>\n";
        $avatar = $CURUSER["avatars"] == "yes" ? htmlsafechars($row["avatar"]) : "";
        if (!$avatar) {
            $avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif";
        }
        $text = format_comment($row["text"]);
        if ($row["editedby"]) {
            $text .= "<font size='1' class='small'><br /><br />{$lang['userdetails_comm_ledited']}<a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n";
        }
        $htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='5'>";
        $htmlout .= "<tr valign='top'>\n";
        $htmlout .= "<td align='center' width='150' style='padding:0px'><img width='150' src=\"{$avatar}\" alt=\"Avatar\" /></td>\n";
        $htmlout .= "<td class='text'>{$text}</td>\n";
        $htmlout .= "</tr>\n";
        $htmlout .= "</table>";
    }
    $htmlout .= end_frame();
    $htmlout .= "</td></tr></table>";
    return $htmlout;
}
コード例 #14
0
function torrenttable($res, $variant = "index")
{
    global $INSTALLER09, $CURUSER, $lang, $free, $mc1;
    require_once INCL_DIR . 'bbcode_functions.php';
    $htmlout = $prevdate = $free_slot = $free_color = $slots_check = $double_slot = $private = $newgenre = $oldlink = $char = $description = $type = $sort = $row = $youtube = '';
    $count_get = 0;
    /** ALL FREE/DOUBLE **/
    foreach ($free as $fl) {
        switch ($fl['modifier']) {
            case 1:
                $free_display = '[Free]';
                break;
            case 2:
                $free_display = '[Double]';
                break;
            case 3:
                $free_display = '[Free and Double]';
                break;
            case 4:
                $free_display = '[Silver]';
                break;
        }
        $slot = make_freeslots($CURUSER['id'], 'fllslot_');
        $book = make_bookmarks($CURUSER['id'], 'bookmm_');
        $all_free_tag = $fl['modifier'] != 0 && ($fl['expires'] > TIME_NOW || $fl['expires'] == 1) ? ' <a class="info" href="#">
            <b>' . $free_display . '</b> 
            <span>' . ($fl['expires'] != 1 ? '
            Expires: ' . get_date($fl['expires'], 'DATE') . '<br />
            (' . mkprettytime($fl['expires'] - TIME_NOW) . ' to go)</span></a><br />' : 'Unlimited</span></a><br />') : '';
    }
    $oldlink = array();
    foreach ($_GET as $key => $var) {
        if (in_array($key, array('sort', 'type'))) {
            continue;
        }
        if (is_array($var)) {
            foreach ($var as $s_var) {
                $oldlink[] = sprintf('%s=%s', urlencode($key) . '%5B%5D', urlencode($s_var));
            }
        } else {
            $oldlink[] = sprintf('%s=%s', urlencode($key), urlencode($var));
        }
    }
    $oldlink = !empty($oldlink) ? join('&amp;', array_map('htmlsafechars', $oldlink)) . '&amp;' : '';
    $links = array('link1', 'link2', 'link3', 'link4', 'link5', 'link6', 'link7', 'link8', 'link9');
    $i = 1;
    foreach ($links as $link) {
        if (isset($_GET['sort']) && $_GET['sort'] == $i) {
            ${$link} = isset($_GET['type']) && $_GET['type'] == 'desc' ? 'asc' : 'desc';
        } else {
            ${$link} = 'desc';
        }
        $i++;
    }
    $htmlout .= "<!--<div class='global_icon'><img src='images/global.design/torrents.png' alt='' title='Categorys' class='global_image' width='25'/></div>\n    <div class='global_head'>Torrents</div><br />\n    <div class='global_text'><br />-->\n   <table border='1' cellspacing='0' cellpadding='5'>\n   <tr>\n   <td class='colhead' align='center'>{$lang["torrenttable_type"]}</td>\n   <td class='colhead' align='left'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=1&amp;type={$link1}'>{$lang["torrenttable_name"]}</a></td>\n   <td class='colhead' align='left'><img src='{$INSTALLER09['pic_base_url']}zip.gif' border='0' alt='Download' title='Download' /></td>";
    $htmlout .= $variant == 'index' ? "<td class='colhead' align='center'><a href='{$INSTALLER09['baseurl']}/bookmarks.php'><img src='{$INSTALLER09['pic_base_url']}bookmarks.png'  border='0' alt='Bookmark' title='Go To My Bookmarks' /></a></td>" : '';
    if ($variant == "mytorrents") {
        $htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_edit"]}</td>\n";
        $htmlout .= "<td class='colhead' align='center'>{$lang["torrenttable_visible"]}</td>\n";
    }
    $htmlout .= "<td class='colhead' align='right'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=2&amp;type={$link2}'>{$lang["torrenttable_files"]}</a></td>\n   <td class='colhead' align='right'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=3&amp;type={$link3}'>{$lang["torrenttable_comments"]}</a></td>\n   <td class='colhead' align='center'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=4&amp;type={$link4}'>{$lang["torrenttable_added"]}</a></td>\n   <td class='colhead' align='center'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=5&amp;type={$link5}'>{$lang["torrenttable_size"]}</a></td>\n   <td class='colhead' align='center'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=6&amp;type={$link6}'>{$lang["torrenttable_snatched"]}</a></td>\n   <td class='colhead' align='right'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=7&amp;type={$link7}'>{$lang["torrenttable_seeders"]}</a></td>\n   <td class='colhead' align='right'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=8&amp;type={$link8}'>{$lang["torrenttable_leechers"]}</a></td>";
    if ($variant == 'index') {
        $htmlout .= "<td class='colhead' align='center'><a href='{$_SERVER["PHP_SELF"]}?{$oldlink}sort=9&amp;type={$link9}'>{$lang["torrenttable_uppedby"]}</a></td>\n";
    }
    $htmlout .= "</tr>\n";
    $categories = genrelist();
    foreach ($categories as $key => $value) {
        $change[$value['id']] = array('id' => $value['id'], 'name' => $value['name'], 'image' => $value['image']);
    }
    while ($row = mysqli_fetch_assoc($res)) {
        //== @author StarionTurbo @copyright 2007 @modname Show torrents by day @version v1.0
        if ($CURUSER['split'] == 'yes') {
            if (get_date($row['added'], 'DATE') == $prevdate) {
                $cleandate = '';
            } else {
                $htmlout .= "<tr><td colspan='12' class='colhead' align='left'><b>{$lang['torrenttable_upped']} " . get_date($row['added'], 'DATE') . "</b></td></tr>";
            }
            $prevdate = get_date($row['added'], 'DATE');
        }
        $row['cat_name'] = htmlsafechars($change[$row['category']]['name']);
        $row['cat_pic'] = htmlsafechars($change[$row['category']]['image']);
        /** Freeslot/doubleslot in Use **/
        $id = $row["id"];
        foreach ($slot as $sl) {
            $slots_check = ($sl['torrentid'] == $id && $sl['free'] == 'yes' or $sl['doubleup'] == 'yes');
        }
        if ($row["sticky"] == "yes") {
            $htmlout .= "<tr class='highlight'>\n";
        } else {
            $htmlout .= '<tr class="' . ($free_color && $all_free_tag != '' || $row['free'] != 0 || $slots_check ? 'freeleech_color' : 'browse_color') . '">';
        }
        $htmlout .= "<td align='center' style='padding: 0px'>";
        if (isset($row["cat_name"])) {
            $htmlout .= "<a href='browse.php?cat=" . (int) $row['category'] . "'>";
            if (isset($row["cat_pic"]) && $row["cat_pic"] != "") {
                $htmlout .= "<img border='0' src='{$INSTALLER09['pic_base_url']}caticons/{$CURUSER['categorie_icon']}/{$row['cat_pic']}' alt='{$row['cat_name']}' />";
            } else {
                $htmlout .= htmlsafechars($row["cat_name"]);
            }
            $htmlout .= "</a>";
        } else {
            $htmlout .= "-";
        }
        $htmlout .= "</td>\n";
        $dispname = htmlsafechars($row["name"]);
        $smalldescr = !empty($row['description']) ? "<i>[" . htmlsafechars($row['description']) . "]</i>" : "";
        $checked = !empty($row['checked_by']) && $CURUSER['class'] >= UC_USER ? "&nbsp;<img src='{$INSTALLER09['pic_base_url']}mod.gif' width='15' border='0' alt='Checked - by " . htmlsafechars($row['checked_by']) . "' title='Checked - by " . htmlsafechars($row['checked_by']) . "' />" : "";
        $poster = empty($row["poster"]) ? "<img src=\\'{$INSTALLER09['pic_base_url']}noposter.png\\' width=\\'150\\' height=\\'220\\' border=\\'0\\' alt=\\'Poster\\' title=\\'poster\\' />" : "<img src=\\'" . htmlsafechars($row['poster']) . "\\' width=\\'150\\' height=\\'220\\' border=\\'0\\' alt=\\'Poster\\' title=\\'poster\\' />";
        //$rating = empty($row["rating"]) ? "No votes yet":"".ratingpic($row["rating"])."";
        $youtube = !empty($row['youtube']) ? "<a href='" . htmlsafechars($row['youtube']) . "' target='_blank'><img src='{$INSTALLER09['pic_base_url']}youtube.png' width='14' height='14' border='0' alt='Youtube Trailer' title='Youtube Trailer' /></a>" : "";
        if (isset($row["descr"])) {
            $descr = str_replace("\"", "&quot;", readMore($row["descr"], 350, "details.php?id=" . (int) $row["id"] . "&amp;hit=1"));
        }
        $descr = str_replace('&', '&amp;', $descr);
        $htmlout .= "<td align='left'><a href='details.php?";
        if ($variant == "mytorrents") {
            $htmlout .= "returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;";
        }
        $htmlout .= "id={$id}";
        if ($variant == "index") {
            $htmlout .= "&amp;hit=1";
        }
        $newgenre = '';
        if (!empty($row['newgenre'])) {
            $newgenre = array();
            $row['newgenre'] = explode(',', $row['newgenre']);
            foreach ($row['newgenre'] as $foo) {
                $newgenre[] = '<a href="browse.php?search=' . trim(strtolower($foo)) . '&amp;searchin=genre">' . $foo . '</a>';
            }
            $newgenre = '<i>' . join(', ', $newgenre) . '</i>';
        }
        $sticky = $row['sticky'] == "yes" ? "<img src='{$INSTALLER09['pic_base_url']}sticky.gif' style='border:none' alt='Sticky' title='Sticky !' />" : "";
        $nuked = $row["nuked"] == "yes" ? "<img src='{$INSTALLER09['pic_base_url']}nuked.gif' style='border:none' alt='Nuked'  align='right' title='Reason :" . htmlsafechars($row["nukereason"]) . "' />" : "";
        $release_group = $row['release_group'] == "scene" ? "&nbsp;<img src='{$INSTALLER09['pic_base_url']}scene.gif' title='Scene' alt='Scene' style='border:none' />" : ($row['release_group'] == "p2p" ? "&nbsp;<img src='{$INSTALLER09['pic_base_url']}p2p.gif' title='P2P' alt='P2P' />" : "");
        $viponly = $row["vip"] == "1" ? "<img src='{$INSTALLER09['pic_base_url']}star.png' border='0' alt='Vip Torrent' title='Vip Torrent' />" : "";
        $bump = $row['bump'] == "yes" ? "<img src='{$INSTALLER09['pic_base_url']}up.gif' width='12px' alt='Re-Animated torrent' title='This torrent was ReAnimated!' />" : "";
        /** FREE Torrent **/
        $free_tag = $row['free'] != 0 ? ' <a class="info" href="#"><b>[FREE]</b> <span>' . ($row['free'] > 1 ? 'Expires: ' . get_date($row['free'], 'DATE') . '<br />(' . mkprettytime($row['free'] - TIME_NOW) . ' to go)<br />' : 'Unlimited<br />') . '</span></a>' : $all_free_tag;
        /** Silver Torrent **/
        $silver_tag = $row['silver'] != 0 ? ' <a class="info" href="#"><b>[SILVER]</b> <span>' . ($row['silver'] > 1 ? 'Expires: ' . get_date($row['silver'], 'DATE') . '<br />(' . mkprettytime($row['silver'] - TIME_NOW) . ' to go)<br />' : 'Unlimited<br />') . '</span></a>' : '';
        if (!empty($slot)) {
            foreach ($slot as $sl) {
                if ($sl['torrentid'] == $id && $sl['free'] == 'yes') {
                    $free_slot = 1;
                }
                if ($sl['torrentid'] == $id && $sl['doubleup'] == 'yes') {
                    $double_slot = 1;
                }
                if ($free_slot && $double_slot) {
                    break;
                }
            }
        }
        $free_slot = $free_slot == 1 ? '&nbsp;<img src="' . $INSTALLER09['pic_base_url'] . 'freedownload.gif" width="12px" alt="Free Slot" title="Free Slot in Use" />&nbsp;<small>Free Slot</small>' : '';
        $double_slot = $double_slot == 1 ? '&nbsp;<img src="' . $INSTALLER09['pic_base_url'] . 'doubleseed.gif" width="12px" alt="Double Upload Slot" title="Double Upload Slot in Use" />&nbsp;<small>Double Slot</small>' : '';
        //==
        $Subs = '';
        if (in_array($row["category"], $INSTALLER09['movie_cats']) && !empty($row["subs"])) {
            $subs_array = explode(",", $row["subs"]);
            require_once CACHE_DIR . 'subs.php';
            foreach ($subs_array as $k => $sid) {
                foreach ($subs as $sub) {
                    if ($sub["id"] == $sid) {
                        $Subs = "<img border=\\'0\\' width=\\'16px\\' style=\\'padding:3px;\\' src=\\'{$sub["pic"]}\\' alt=\\'{$sub["name"]}\\' title=\\'{$sub["name"]}\\' />";
                    }
                }
            }
        } else {
            $Subs = "---";
        }
        $htmlout .= "' onmouseover=\"Tip('<b>" . CutName($dispname, 80) . "</b><br /><b>Added:&nbsp;" . get_date($row['added'], 'DATE', 0, 1) . "</b><br /><b>Size:&nbsp;" . mksize(htmlsafechars($row["size"])) . "</b><br /><b>Subtitle:&nbsp;{$Subs}</b><br /><b>Seeders:&nbsp;" . htmlsafechars($row["seeders"]) . "</b><br /><b>Leechers:&nbsp;" . htmlsafechars($row["leechers"]) . "</b><br />{$poster}');\" onmouseout=\"UnTip();\"><b>" . CutName($dispname, 45) . "</b></a>&nbsp;&nbsp;<a href=\"javascript:klappe_descr('descr" . (int) $row["id"] . "');\" ><img src=\"{$INSTALLER09['pic_base_url']}plus.png\" border=\"0\" alt=\"Show torrent info in this page\" title=\"Show torrent info in this page\" /></a>&nbsp;&nbsp;{$youtube}&nbsp;{$viponly}&nbsp;{$release_group}&nbsp;{$sticky}&nbsp;" . ($row['added'] >= $CURUSER['last_browse'] ? " <img src='{$INSTALLER09['pic_base_url']}newb.png' border='0' alt='New !' title='New !' />" : "") . "&nbsp;{$checked}&nbsp;{$free_tag}&nbsp;{$silver_tag}&nbsp;{$nuked}<br />{$free_slot}&nbsp;{$double_slot}&nbsp;{$newgenre}&nbsp;{$bump}&nbsp;{$smalldescr}</td>\n";
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='center'><a href=\"download.php?torrent={$id}" . ($CURUSER['ssluse'] == 3 ? "&amp;ssl=1" : "") . "\"><img src='{$INSTALLER09['pic_base_url']}zip.gif' border='0' alt='Download This Torrent!' title='Download This Torrent!' /></a></td>\n";
        }
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='center'><a href='edit.php?id=" . (int) $row['id'] . "amp;returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'>{$lang["torrenttable_edit"]}</a></td>\n";
        }
        $htmlout .= $variant == "index" ? "<td align='center'><a href=\"download.php?torrent={$id}" . ($CURUSER['ssluse'] == 3 ? "&amp;ssl=1" : "") . "\"><img src='{$INSTALLER09['pic_base_url']}zip.gif' border='0' alt='Download This Torrent!' title='Download This Torrent!' /></a></td>" : "";
        if ($variant == "mytorrents") {
            $htmlout .= "<td align='right'>";
            if ($row["visible"] == "no") {
                $htmlout .= "<b>{$lang["torrenttable_not_visible"]}</b>";
            } else {
                $htmlout .= "{$lang["torrenttable_visible"]}";
            }
            $htmlout .= "</td>\n";
        }
        /** pdq bookmarks **/
        $booked = '';
        if (!empty($book)) {
            foreach ($book as $bk) {
                if ($bk['torrentid'] == $id) {
                    $booked = 1;
                }
            }
        }
        $rm_status = !$booked ? ' style="display:none;"' : ' style="display:inline;"';
        $bm_status = $booked ? ' style="display:none;"' : ' style="display:inline;"';
        $bookmark = '<span id="bookmark' . $id . '"' . $bm_status . '>
                    <a href="bookmark.php?torrent=' . $id . '&amp;action=add" class="bookmark" name="' . $id . '">
                    <span title="Bookmark it!" class="add_bookmark_b">
                    <img src="' . $INSTALLER09['pic_base_url'] . 'aff_tick.gif" align="top" width="14px" alt="Bookmark it!" title="Bookmark it!" />
                    </span>
                    </a>
                    </span>
                    
                    <span id="remove' . $id . '"' . $rm_status . '>
                    <a href="bookmark.php?torrent=' . $id . '&amp;action=delete" class="remove" name="' . $id . '">
                    <span class="remove_bookmark_b">
                    <img src="' . $INSTALLER09['pic_base_url'] . 'aff_cross.gif" align="top" width="14px" alt="Delete Bookmark!" title="Delete Bookmark!" />
                    </span>
                    </a>
                    </span>';
        if ($variant == "index") {
            $htmlout .= "<td align='right'>{$bookmark}</td>";
        }
        if ($row["type"] == "single") {
            $htmlout .= "<td align='right'>" . (int) $row["numfiles"] . "</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='filelist.php?id={$id}'>" . (int) $row["numfiles"] . "</a></b></td>\n";
            }
        }
        if (!$row["comments"]) {
            $htmlout .= "<td align='right'>" . (int) $row["comments"] . "</td>\n";
        } else {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;hit=1&amp;tocomm=1'>" . (int) $row["comments"] . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a href='details.php?id={$id}&amp;page=0#startcomments'>" . (int) $row["comments"] . "</a></b></td>\n";
            }
        }
        $htmlout .= "<td align='center'><span style='white-space: nowrap;'>" . str_replace(",", "<br />", get_date($row['added'], '')) . "</span></td>\n";
        $htmlout .= "<td align='center'>" . str_replace(" ", "<br />", mksize($row["size"])) . "</td>\n";
        if ($row["times_completed"] != 1) {
            $_s = "" . $lang["torrenttable_time_plural"] . "";
        } else {
            $_s = "" . $lang["torrenttable_time_singular"] . "";
        }
        $htmlout .= "<td align='center'><a href='snatches.php?id={$id}'>" . number_format($row["times_completed"]) . "<br />{$_s}</a></td>\n";
        if ($row["seeders"]) {
            if ($variant == "index") {
                if ($row["leechers"]) {
                    $ratio = $row["seeders"] / $row["leechers"];
                } else {
                    $ratio = 1;
                }
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#seeders'><font color='" . get_slr_color($ratio) . "'>" . (int) $row["seeders"] . "</font></a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["seeders"]) . "' href='peerlist.php?id={$id}#seeders'>" . (int) $row["seeders"] . "</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'><span class='" . linkcolor($row["seeders"]) . "'>" . (int) $row["seeders"] . "</span></td>\n";
        }
        if ($row["leechers"]) {
            if ($variant == "index") {
                $htmlout .= "<td align='right'><b><a href='peerlist.php?id={$id}#leechers'>" . number_format($row["leechers"]) . "</a></b></td>\n";
            } else {
                $htmlout .= "<td align='right'><b><a class='" . linkcolor($row["leechers"]) . "' href='peerlist.php?id={$id}#leechers'>" . (int) $row["leechers"] . "</a></b></td>\n";
            }
        } else {
            $htmlout .= "<td align='right'>0</td>\n";
        }
        if ($variant == "index") {
            $htmlout .= "<td align='center'>" . (isset($row["username"]) ? $row["anonymous"] == "yes" && $CURUSER['class'] < UC_STAFF && $row['owner'] != $CURUSER['id'] ? "<i>" . $lang['torrenttable_anon'] . "</i>" : "<a href='userdetails.php?id=" . (int) $row["owner"] . "'><b>" . htmlsafechars($row["username"]) . "</b></a>" : "<i>(" . $lang["torrenttable_unknown_uploader"] . ")</i>") . "</td>\n";
        }
        $htmlout .= "</tr>\n";
        $htmlout .= "<tr id=\"kdescr" . (int) $row["id"] . "\" style=\"display:none;\"><td width=\"100%\" colspan=\"12\">" . format_comment($descr, false) . "</td></tr>\n";
    }
    $htmlout .= "</table><!--</div>-->\n";
    return $htmlout;
}
コード例 #15
0
ファイル: offer_details.php プロジェクト: CharlieHD/U-232-V2
}
$stdfoot = array('js' => array('popup'));
$res = sql_query('SELECT o.*, o.added as utadded, u.username 
                  FROM offers AS o LEFT JOIN users AS u ON (u.id=o.userid) 
                  WHERE o.id = ' . $id) or sqlerr(__FILE__, __LINE__);
if (!mysql_num_rows($res)) {
    stderr('Error', 'Invalid Offer ID');
}
$num = mysql_fetch_assoc($res);
$added = get_date($num['utadded'], '');
$s = htmlspecialchars($num['offer']);
$HTMLOUT .= '<h3>Details Of Offer: ' . $s . '</h3>';
$HTMLOUT .= "<table border='1' width='750px' cellspacing='0' cellpadding='5'><tr><td align='center' colspan='2'><h1>{$s}</h1></td></tr>";
if ($num['descr']) {
    require_once 'include/bbcode_functions.php';
    $HTMLOUT .= "<tr><td align='right' valign='top'><b>Description</b></td>\r\n    <td align='left' colspan='2' valign='top'>" . format_comment($num['descr']) . "</td></tr>";
}
$HTMLOUT .= "<tr><td align='right'><b>Added</b></td>\r\n<td align='left'>{$added}</td></tr>";
if ($CURUSER['id'] == $num['userid'] || $CURUSER['class'] >= UC_MODERATOR) {
    $edit = " | <a class='altlink' href='viewoffers.php?id=" . $id . "&amp;edit_offer'>Edit Offer</a> |";
    $delete = " <a class='altlink' href='viewoffers.php?id=" . $id . "&amp;del_offer'>Delete offer</a> ";
    if ($num['torrentid'] != 0) {
        $reset = "| <a class='altlink' href='viewoffers.php?id=" . $id . "&amp;offer_reset'>Re-set Offer</a>";
    }
}
$HTMLOUT .= "<tr>\r\n<td align='right'><b>offered&nbsp;By</b></td><td align='left'>\r\n<a class='altlink' href='userdetails.php?id={$num['userid']}'>{$num['username']}</a>  {$edit}  {$delete} {$reset}  |\r\n<a class='altlink' href='viewoffers.php'><b>All offers</b></a> </td></tr><tr><td align='right'>\r\n<b>Vote for this offer</b></td><td align='left'><a href='viewoffers.php?id=" . $id . "&amp;offer_vote'><b>Vote</b></a>\r\n</td></tr>\r\n" . ($INSTALLER09['reports'] ? "<tr><td align='right'><b>Report Offer</b></td><td align='left'>\r\nfor breaking the rules \r\n<form action='report.php?type=Offer&amp;id={$id}' method='post'><input class='btn' type='submit' name='submit' value='Report Offer' /></form></td>\r\n</tr>" : '');
if ($num['torrentid'] == 0) {
    $HTMLOUT .= "<tr><td align='right' valign='top'><b>Accept This Offer</b></td>\r\n    <td>\r\n    <form method='post' action='viewoffers.php?id=" . $id . "&amp;offer_filled'>\r\n    <strong>" . $INSTALLER09['baseurl'] . "/details.php?id=</strong><input type='text' size='10' name='torrentid' value='' /> <input type='submit' value='Fill Offer' class='btn' /><br />\r\n    Enter the <b>ID</b>  of the torrent. (copy/paste the <strong>ID</strong> from another window/tab the correct ID number)<br /></form></td>\r\n    </tr>\n";
} else {
    $HTMLOUT .= "<tr><td align='right' valign='top'><b>This Offer was accepted:</b></td><td><a class='altlink' href='details.php?id=" . $num['torrentid'] . "'><b>" . $INSTALLER09['baseurl'] . "/details.php?id=" . $num['torrentid'] . "</b></a></td></tr>";
}
コード例 #16
0
ファイル: mailbox.php プロジェクト: l3oncoder/TorrentTrader
         $reading = true;
         if (isset($_GET['inbox']) && $arr["unread"] == "yes") {
             SQL_Query_exec("UPDATE messages SET `unread` = 'no' WHERE `id` = {$arr['id']} AND `receiver` = {$CURUSER['id']}");
         }
     }
     if ($arr["unread"] == "yes") {
         $format = "font-weight:bold;";
         $unread = true;
     }
     $table['&nbsp;'] = th_left("<input type=\"checkbox\" name=\"msgs[{$arr['id']}]\" " . ($reading ? "checked='checked'" : "") . " onclick=\"this.form.remove.disabled=true;\" />", 1);
     $table['Sender'] = th_left("{$sender}", 1, $format);
     $table['Sent_to'] = th_left("{$sentto}", 1, $format);
     $table['Subject'] = th_left("<a href=\"javascript:read({$arr['id']});\"><img src=\"" . $site_config["SITEURL"] . "/images/plus.gif\" id=\"img_{$arr['id']}\" class=\"read\" border=\"0\" alt='' /></a>&nbsp;<a href=\"javascript:read({$arr['id']});\">{$subject}</a>", 1, $format);
     $table['Date'] = th_left(utc_to_tz($arr['added']), 1, $format);
     table($table, $tablefmt);
     $display = "<div>" . format_comment($arr['msg']) . "<br /><br />";
     if (isset($_GET['inbox']) && is_valid_id($arr["sender"])) {
         $display .= "<input type=\"submit\" name=\"compose[{$arr['id']}]\" value=\"Reply\" />&nbsp;\n";
     } elseif (isset($_GET['draft']) || isset($_GET['templates'])) {
         $display .= "<input type=\"submit\" name=\"compose[{$arr['id']}]\" value=\"Edit\" />&nbsp;";
     }
     if (isset($_GET['inbox']) && $arr['unread'] == 'yes') {
         $display .= "<input type=\"submit\" name=\"mark[{$arr['id']}]\" value=\"Mark as Read\" />&nbsp;\n";
     }
     $display .= "<input type=\"submit\" name=\"remove[{$arr['id']}]\" value=\"Delete\" />&nbsp;\n";
     $display .= "</div>";
     table(td_left($display, 1, "padding:0 6px 6px 6px"), $tablefmt, "id=\"msg_{$arr['id']}\" style=\"display:none;\"");
 }
 // if ($count)
 //{
 $buttons = "<input type=\"button\" value=\"" . T_("SELECTED_DELETE") . "\" onclick=\"this.form.remove.disabled=!this.form.remove.disabled;\" />";
コード例 #17
0
ファイル: index.php プロジェクト: ZenoX2012/CyBerFuN-CoDeX
&amp;returnto=<?php 
                echo urlencode($_SERVER['PHP_SELF']);
                ?>
'><b>D</b></a>]</font><?php 
            }
            ?>
		</td></tr>
		<tr id="kchangelog<?php 
            echo $arr['id'];
            ?>
" style="display:<?php 
            echo $arr["sticky"] == "yes" ? "" : "none";
            ?>
;" ><td class="embdded">
		<?php 
            echo format_comment($arr["body"], true);
            ?>
		<br/>
		Added by <a href="userdetails.php?id=<?php 
            echo $arr["userid"];
            ?>
"><b><?php 
            echo $arr["username"];
            ?>
</b></a>
		</td></tr>
	</table>
<br/>
<?php 
        }
    }
コード例 #18
0
ファイル: admin.team.php プロジェクト: Karpec/gizd
$teamsres = do_sqlquery("SELECT COUNT(*) from {$TABLE_PREFIX}teams where id>0 ORDER BY id ASC {$limit}");
$teamnum = mysqli_fetch_row($teamsres);
$num2 = $teamnum[0];
$perpage = max(0, $CURUSER["torrentsperpage"]) > 0 ? $CURUSER["torrentsperpage"] : 10;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $num2, "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=teams&amp;");
$admintpl->set("pagertop", $pagertop);
$admintpl->set("pagerbottom", $pagerbottom);
$teamres = do_sqlquery("SELECT id, name, image, owner, info from {$TABLE_PREFIX}teams where id>0 ORDER BY id ASC {$limit}");
$teams = array();
$i = 0;
while ($row = mysqli_fetch_array($teamres)) {
    $teams[$i][id] = (int) $row['id'];
    $teams[$i][name] = htmlspecialchars($row['name']);
    $teams[$i][image] = htmlspecialchars($row['image']);
    $teams[$i][owner] = (int) $row['owner'];
    $teams[$i][info] = format_comment($row['info']);
    $owner = (int) $row['owner'];
    $OWNERNAME1 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username, ul.prefixcolor, ul.suffixcolor FROM {$TABLE_PREFIX}users u left join {$TABLE_PREFIX}users_level ul on u.id_level=ul.id WHERE u.id={$owner}");
    $OWNERNAME2 = mysqli_fetch_array($OWNERNAME1);
    $teams[$i][OWNERNAME] = stripslashes($OWNERNAME2[prefixcolor]) . $OWNERNAME2['username'] . stripslashes($OWNERNAME2[suffixcolor]);
    $OWNERNAME = $OWNERNAME2['username'];
    $id = (int) $row['id'];
    $name = htmlspecialchars($row['name']);
    $image = htmlspecialchars($row['image']);
    $info = htmlspecialchars($row['info']);
    $teams[$i][delb] = "<a href='index.php?page=admin&user={$CURUSER['uid']}&code={$CURUSER['random']}&do=teams&del={$id}&team={$name}'><img src={$STYLEURL}/images/delete.png border=0></a>";
    $teams[$i][edbj] = "<a href='index.php?page=admin&user={$CURUSER['uid']}&code={$CURUSER['random']}&do=teams&editid={$id}&name={$name}&image={$image}&info={$info}&owner={$OWNERNAME}'><img src={$STYLEURL}/images/edit.png border=0></a>";
    $i++;
}
$admintpl->set("teams", $teams);
$end = "</table><br>";
コード例 #19
0
ファイル: shistory.php プロジェクト: thefkboss/U-232
$pager = pager($perpage, $count1, 'admin.php?action=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= begin_main_frame();
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        }
        if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) {
            $private = "<img src='{$TBDEV['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        } else {
            $private = "<img src='{$TBDEV['pic_base_url']}group.png' alt='Public shout' title='Public shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        }
        $date = get_date($arr["date"], 0, 1);
        $user_stuff = $arr;
        $user_stuff['id'] = $arr['userid'];
        $HTMLOUT .= "<tr style='background-color:grey;'><td><span class='size1' style='color:white; '>[{$date}]&nbsp;[{$private}]</span>\n " . format_username($user_stuff) . "<span class='size2' style='color:white;'> " . format_comment($arr["text"]) . "\n</span></td></tr>\n";
    }
    $HTMLOUT .= "</table>";
}
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
$HTMLOUT .= end_main_frame();
print stdhead('Shout History') . $HTMLOUT . stdfoot();
コード例 #20
0
ファイル: post_functions.php プロジェクト: Bigjoos/U-232-V5
function insert_compose_frame($id, $newtopic = true, $quote = false, $attachment = false)
{
    global $CURUSER, $INSTALLER09, $Multi_forum;
    $htmlout = '';
    if ($newtopic) {
        $res = sql_query("SELECT name FROM forums WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysqli_fetch_assoc($res) or die("Bad forum ID!");
        // $htmlout .="<h3>New topic in <a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=".$id."'>".htmlsafechars($arr["name"])."</a> forum</h3>";
        $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=" . $id . "'>" . htmlsafechars($arr["name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>New Topic</span>\n\t\t\t\t</div><br />-->";
    } else {
        $res = sql_query("SELECT t.forum_id, t.topic_name, t.locked, f.min_class_read, f.name AS forum_name FROM topics AS t LEFT JOIN forums AS f ON f.id = t.forum_id WHERE t.id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysqli_fetch_assoc($res) or die("Forum error, Topic not found.");
        $forum = htmlsafechars($arr["forum_name"]);
        $forumid = (int) $arr['forum_id'];
        if ($arr['locked'] == 'yes') {
            stderr("Sorry", "The topic is locked.");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        if ($CURUSER["class"] < $arr["min_class_read"]) {
            $htmlout .= stdmsg("Sorry", "You are not allowed in here.");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose") . $htmlout . stdfoot();
            exit;
        }
        $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=" . $forumid . "'>{$forum}</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&amp;topicid=" . $id . "'>" . htmlsafechars($arr["topic_name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>Post Reply</span>\n\t\t\t\t</div><br />-->";
        // $htmlout .="<h3 align='center'>Reply to topic:<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&amp;topicid=".$id."'>".htmlsafechars($arr["topic_name"])."</a></h3>";
    }
    $htmlout .= "\n    <script type='text/javascript'>\n    /*<![CDATA[*/\n    function Preview()\n    {\n    document.compose.action = './forums/preview.php'\n    document.compose.target = '_blank';\n    document.compose.submit();\n    return true;\n    }\n    /*]]>*/\n    </script>";
    //$htmlout .= begin_frame("Compose", true);
    $htmlout .= "<form method='post' name='compose' action='{$INSTALLER09['baseurl']}/forums.php' enctype='multipart/form-data'>\n\t  <input type='hidden' name='action' value='post' />\n\t  <input type='hidden' name='" . ($newtopic ? 'forumid' : 'topicid') . "' value='" . $id . "' />";
    //$htmlout .= begin_table(true);
    $htmlout .= "<table border='0' cellspacing='0' cellpadding='5' class='tborder'>\n\t<tr>\n<td class='thead' colspan='2'><strong>Compose</strong></td>\n</tr>\n\t";
    if ($newtopic) {
        $htmlout .= "<tr>\n\t\t\t<td class=row width='10%'>Subject</td>\n\t\t\t<td class=row align='left'>\n\t\t\t\t<input type='text' class='form-control col-md-12' size='100' maxlength='{$Multi_forum['configs']['maxsubjectlength']}' name='topic_name'  />\n\t\t\t</td>\n\t\t</tr>";
    }
    if ($quote) {
        $postid = (int) $_GET["postid"];
        if (!is_valid_id($postid)) {
            stderr("Error", "Invalid ID!");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        $res = sql_query("SELECT posts.*, users.username FROM posts JOIN users ON posts.user_id = users.id WHERE posts.id =" . sqlesc($postid)) or sqlerr(__FILE__, __LINE__);
        if (mysqli_num_rows($res) == 0) {
            stderr("Error", "No post with this ID");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Error - No post with this ID", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        $arr = mysqli_fetch_assoc($res);
    }
    $htmlout .= "<tr>\n\t\t<td class=row valign='top'>Body</td>\n\t\t<td class=row>";
    $qbody = $quote ? "[quote=" . htmlsafechars($arr["username"]) . "]" . htmlsafechars($arr["body"]) . "[/quote]" : "";
    //if (function_exists('BBcode'))
    //$htmlout .= BBcode($qbody, true);
    if (function_exists('textbbcode')) {
        $htmlout .= ' 
		' . textbbcode('compose', 'body', isset($qbody) ? htmlsafechars($qbody) : '') . ' 
		';
    } else {
        $htmlout .= "<textarea name='body' style='width:99%' rows='7'>{$qbody}</textarea>";
    }
    $htmlout .= "</td></tr>";
    if ($Multi_forum['configs']['use_attachment_mod'] && $attachment) {
        $htmlout .= "<tr>\n\t\t\t\t<td colspan='2'><fieldset class='fieldset'><legend>Add Attachment</legend>\n\t\t\t\t<input type='checkbox' name='uploadattachment' value='yes' />\n\t\t\t\t<input type='file' name='file' size='60' />\n        <div class='error'>Allowed Files: rar, zip<br />Size Limit " . mksize($Multi_forum['configs']['maxfilesize']) . "</div></fieldset>\n\t\t\t\t</td>\n\t\t\t</tr>";
    }
    $htmlout .= "<tr>\n   \t  <td class=row align='center' colspan='2'>" . post_icons() . "</td>\n \t     </tr><tr class=row>\n \t\t  <td colspan='2' align='center'>\n \t     <input class='btn btn-primary dropdown-toggle' type='submit' value='Submit' /><input class='btn btn-primary dropdown-toggle' type='button' value='Preview' name='button2' onclick='return Preview();' />\n";
    if ($newtopic) {
        $htmlout .= "Anonymous Topic<input type='checkbox' name='anonymous' value='yes'/>\n";
    } else {
        $htmlout .= "Anonymous Post<input type='checkbox' name='anonymous' value='yes'/>\n";
    }
    $htmlout .= "</td></tr></form>\n";
    $htmlout .= "<tr>\n\t\t\t\t<td colspan='2' align='right' class='tfoot'>\n\t\t\t\t" . insert_quick_jump_menu() . "\n\t\t\t\t</td>\n\t\t\t</tr>";
    $htmlout .= end_table();
    $htmlout .= "<br />";
    // $htmlout .= end_frame();
    // ------ Get 10 last posts if this is a reply
    if (!$newtopic && $INSTALLER09['show_last_10']) {
        $postres = sql_query("SELECT p.id, p.added, p.body, p.anonymous, u.id AS uid, u.enabled, u.class, u.donor, u.warned, u.chatpost, u.leechwarn, u.pirate, u.king, u.username, u.avatar, u.offensive_avatar " . "FROM posts AS p " . "LEFT JOIN users AS u ON u.id = p.user_id " . "WHERE p.topic_id=" . sqlesc($id) . " " . "ORDER BY p.id DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
        if (mysqli_num_rows($postres) > 0) {
            $htmlout .= "<br />";
            $htmlout .= begin_frame("10 last posts, in reverse order");
            while ($post = mysqli_fetch_assoc($postres)) {
                //$avatar = ($CURUSER["avatars"] == "all" ? htmlsafechars($post["avatar"]) : ($CURUSER["avatars"] == "some" && $post["offavatar"] == "no" ? htmlsafechars($post["avatar"]) : ""));
                $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : "";
                if ($post['anonymous'] == 'yes') {
                    $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar'];
                } else {
                    $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : '';
                }
                if (empty($avatar)) {
                    $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar'];
                }
                $user_stuff = $post;
                $user_stuff['id'] = (int) $post['uid'];
                if ($post["anonymous"] == "yes") {
                    if ($CURUSER['class'] < UC_STAFF && $post["uid"] != $CURUSER["id"]) {
                        $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                    } else {
                        $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> [<b>" . format_username($user_stuff, true) . "</b>] at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                    }
                } else {
                    $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by " . (!empty($post["username"]) ? format_username($user_stuff, true) : "unknown[" . (int) $post['uid'] . "]") . " at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                }
                $htmlout .= begin_table(true);
                $htmlout .= "<tr>\n\t\t\t\t <td height='100' width='100' align='center' style='padding: 0px' valign='top'><img height='100' width='100' src='" . $avatar . "' alt='User avvy' /></td>\n\t\t\t\t <td class='comment' valign='top'>" . format_comment($post["body"]) . "</td>\n\t\t\t\t </tr>";
                $htmlout .= end_table();
            }
            $htmlout .= end_frame();
        }
    }
    //$htmlout .= insert_quick_jump_menu();
    return $htmlout;
}
コード例 #21
0
ファイル: admin.ispy.php プロジェクト: Karpec/gizd
        $arr2 = mysqli_fetch_assoc($res2);
        if ($FORUMLINK == "smf") {
            $res3 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username FROM {$TABLE_PREFIX}users WHERE smf_fid=" . $arr["sender"]) or sqlerr();
        } else {
            $res3 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username FROM {$TABLE_PREFIX}users WHERE id=" . $arr["sender"]) or sqlerr();
        }
        $arr3 = mysqli_fetch_assoc($res3);
        $spy[$i]["id"] = $arr["id"];
        if ($arr['sender'] == "0") {
            $spy[$i]["sender"] = "<a href=index.php?page=userdetails&amp;id=0><b>System</b></a>";
        } elseif ($FORUMLINK == "smf") {
            $spy[$i]["sender"] = "<a href=index.php?page=forum&action=profile;u=" . $arr["sender"] . "><b>" . $arr3["username"] . "</b></a>";
        } else {
            $spy[$i]["sender"] = "<a href=index.php?page=userdetails&amp;id=" . $arr["sender"] . "><b>" . $arr3["username"] . "</b></a>";
        }
        if ($FORUMLINK == "smf") {
            $spy[$i]["receiver"] = "<a href=index.php?page=forum&action=profile;u=" . $arr["receiver"] . "><b>" . $arr2["username"] . "</b></a>";
        } else {
            $spy[$i]["receiver"] = "<a href=index.php?page=userdetails&amp;id=" . $arr["receiver"] . "><b>" . $arr2["username"] . "</b></a>";
        }
        $spy[$i]["msg"] = format_comment(unesc($arr["msg"]));
        $spy[$i]["added"] = date("d/m/Y H:i:s", $arr["added"] - $offset);
        $spy[$i]["readed"] = $arr["readed"];
        $spy[$i]["delete"] = "<a href=\"index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=ispy&amp;action=delete&amp;id=" . $spy[$i]["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>";
        $i++;
    }
}
$admintpl->set("spy", $spy);
unset($arr);
mysqli_free_result($res) || is_object($res) && get_class($res) == "mysqli_result" ? true : false;
unset($spy);
コード例 #22
0
ファイル: shoutbox.php プロジェクト: lavanoid/TorrentTrader3
    while ($row = mysql_fetch_assoc($result)) {
        if ($alt) {
            echo '<tr class="shoutbox_noalt">';
            $alt = false;
        } else {
            echo '<tr class="shoutbox_alt">';
            $alt = true;
        }
        echo '<td style="font-size: 9px; width: 118px;">';
        echo "<div align='left' style='float: left'>";
        echo date('jS M, g:ia', utc_to_tz_time($row['date']));
        echo "</div>";
        if ($CURUSER["edit_users"] == "yes" || $CURUSER['username'] == $row['user']) {
            echo "<div align='right' style='float: right'><a href='" . $site_config['SITEURL'] . "/shoutbox.php?del=" . $row['msgid'] . "' style='font-size: 8px'>[D]</a></div>";
        }
        echo '</td><td style="font-size: 12px; padding-left: 5px"><a href="' . $site_config['SITEURL'] . '/account-details.php?id=' . $row['userid'] . '" target="_parent"><b>' . $row['user'] . ':</b></a>&nbsp;&nbsp;' . nl2br(format_comment($row['message']));
        echo '</td></tr>';
    }
    ?>

</table>
</div>
<br />

<?php 
    //if the user is logged in, show the shoutbox, if not, dont.
    if (!isset($_GET['history'])) {
        if (isset($_COOKIE["pass"])) {
            echo "<form name='shoutboxform' action='shoutbox.php' method='post'>";
            echo "<center><table width='100%' border='0' cellpadding='1' cellspacing='1'>";
            echo "<tr class='shoutbox_messageboxback'>";
コード例 #23
0
        sql_query($query);
        if (mysqli_affected_rows($GLOBALS["___mysqli_ston"])) {
            stderr('Success', 'Announcement was successfully created');
        }
        stderr('Error', 'Contact an administrator');
    }
    echo stdhead("Create Announcement", false);
    $HTMLOUT = "";
    $HTMLOUT .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>\r\n \t<tr>\r\n \t<td class='embedded'><div align='center'>\r\n \t<h1>Create Announcement for " . $n_pms . " user" . ($n_pms > 1 ? 's' : '') . "&nbsp;!</h1>";
    $HTMLOUT .= "<form name='compose' method='post' action='{$INSTALLER09['baseurl']}/new_announcement.php'>\r\n \t<table border='1' cellspacing='0' cellpadding='5'>\r\n \t<tr>\r\n \t<td colspan='2'><b>Subject: </b>\r\n \t<input name='subject' type='text' size='76' value='" . htmlsafechars($subject) . "' /></td>\r\n \t</tr>\r\n \t<tr><td colspan='2'><div align='center'>\r\n  " . textbbcode("compose", "msg", $body) . "\r\n  </div></td></tr>";
    $HTMLOUT .= "<tr><td colspan='2' align='center'>";
    $HTMLOUT .= "<select name='expiry'>";
    reset($days);
    foreach ($days as $x) {
        $HTMLOUT .= '<option value="' . $x[0] . '"' . ($expiry == $x[0] ? '' : '') . '>' . $x[1] . '</option>';
    }
    $HTMLOUT .= "</select>\r\n\r\n \t<input type='submit' name='buttonval' value='Preview' class='btn' />\r\n \t<input type='submit' name='buttonval' value='Submit' class='btn' />\r\n \t</td></tr></table>\r\n \t<input type='hidden' name='n_pms' value='" . $n_pms . "' />\r\n \t<input type='hidden' name='ann_query' value='" . $ann_query . "' />\r\n \t<input type='hidden' name='ann_hash' value='" . $ann_hash . "' />\r\n \t</form><br /><br />\r\n \t</div></td></tr></table>";
    if ($body) {
        $newtime = TIME_NOW + 86400 * $expiry;
        $HTMLOUT .= "<table width='700' class='main' border='0' cellspacing='1' cellpadding='1'>\r\n \t<tr><td bgcolor='#663366' align='center' valign='baseline'><h2><font color='white'>Announcement: \r\n \t" . htmlsafechars($subject) . "</font></h2></td></tr>\r\n \t<tr><td class='text'>\r\n \t" . format_comment($body) . "<br /><hr />Expires: " . get_date($newtime, 'DATE') . "";
        $HTMLOUT .= "</td></tr></table>";
    }
} else {
    // Shouldn't be here
    header("HTTP/1.0 404 Not Found");
    $HTMLOUT = "";
    $HTMLOUT .= "<html><h1>Not Found</h1><p>The requested URL " . htmlsafechars($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], '/') + 1) . " was not found on this server.</p>\r\n<hr />\r\n<address>{$_SERVER['SERVER_SOFTWARE']} Server at {$INSTALLER09['baseurl']} Port 80</address></body></html>\n";
    echo $HTMLOUT;
    die;
}
echo $HTMLOUT . stdfoot($stdfoot);
コード例 #24
0
ファイル: forward.php プロジェクト: CharlieHD/U-232-V3
 </tr>
 <tr>
     <td align="right" class="one" valign="top"><span style="font-weight: bold;">Orignal Sender:</span></td>
     <td align="left" class="one" valign="top"><span style="font-weight: bold;">' . $forwarded_username . '</span></td>
 </tr>
 <tr>
     <td align="right" class="one" valign="top"><span style="font-weight: bold;">From:</span></td>
     <td align="left" class="one" valign="top"><span style="font-weight: bold;">' . $CURUSER['username'] . '</span></td>
 </tr>
 <tr>
     <td align="right" class="one" valign="top"><span style="font-weight: bold;">Subject:</span></td>
     <td align="left" class="one" valign="top"><input type="text" class="text_default" name="subject" value="Fwd: ' . htmlsafechars($message['subject']) . '" /></td>
 </tr>
 <tr>
     <td align="center" class="one"></td>
     <td align="left" class="two">-------- Original Message from ' . $forwarded_username . ': --------<br />' . format_comment($message['msg']) . '</td>
 </tr>
 <tr>
     <td align="right" class="one" valign="top"></td>
     <td align="left" class="one"><span style="font-weight: bold;">You can add your own message, it will appear above the PM being forwarded.</span></td>
 </tr>
 <tr>
     <td align="right" class="one" valign="top"><span style="font-weight: bold;">Message:</span></td>
     <td align="left" class="one" valign="top">' . BBcode($body, FALSE) . '</td>
 </tr>
 <tr>
     <td colspan="2" align="center" class="one">' . ($CURUSER['class'] >= UC_STAFF ? '<span style="font-weight: bold;color:red;">Mark as URGENT!</span>
     <input type="checkbox" name="urgent" value="yes" />&nbsp' : '') . ' Save Message 
     <input type="checkbox" name="save" value="1" />
     <input type="hidden" name="first_from" value="' . $forwarded_username . '" /> 
     <input type="submit" class="button" name="move" value="Forward" onmouseover="this.className=\'button_hover\'" onmouseout="this.className=\'button\'" /></td>
コード例 #25
0
ファイル: index.php プロジェクト: Arkhana/TorrentTrader2.08
        while ($array = mysql_fetch_assoc($res)) {
            if (!$array["username"]) {
                $array["username"] = T_('UNKNOWN_USER');
            }
            $numcomm = get_row_count("comments", "WHERE news='" . $array['id'] . "'");
            // Show first 2 items expanded
            if ($news_flag < 2) {
                $disp = "block";
                $pic = "minus";
            } else {
                $disp = "none";
                $pic = "plus";
            }
            print "<br /><a href=\"javascript: klappe_news('a" . $array['id'] . "')\"><img border=\"0\" src=\"" . $site_config["SITEURL"] . "/images/{$pic}.gif\" id=\"pica" . $array['id'] . "\" alt=\"Show/Hide\" />";
            print "&nbsp;<b>" . $array['title'] . "</b></a> - <b>" . T_("POSTED") . ":</b> " . date("d-M-y", utc_to_tz_time($array['added'])) . " <b>" . T_("BY") . ":</b> {$array['username']}";
            print "<div id=\"ka" . $array['id'] . "\" style=\"display: {$disp};\"> " . format_comment($array["body"]) . " <br /><br />" . T_("COMMENTS") . " (<a href='comments.php?type=news&amp;id=" . $array['id'] . "'>" . number_format($numcomm) . "</a>)</div><br /> ";
            $news_flag++;
        }
        print "</ul></td></tr></table>\n";
    } else {
        echo "<br /><b>" . T_("NO_NEWS") . "</b>";
    }
    end_frame();
}
if ($site_config['SHOUTBOX'] && !($CURUSER['hideshoutbox'] == 'yes')) {
    begin_frame(T_("SHOUTBOX"));
    echo '<iframe name="shout_frame" src="shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" scrolling="no" align="middle"></iframe>';
    printf(T_("SHOUTBOX_REFRESH"), 5) . "<br />";
    end_frame();
}
// latest torrents
コード例 #26
0
ファイル: shit_list.php プロジェクト: CharlieHD/U-232-V3
      <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="center" valign="top" width="80">' . avatar_stuff($shit_list) . '

      ' . print_user_stuff($shit_list) . '

      <b> [ ' . get_user_class_name($shit_list['class']) . ' ]</b>

      <a class="altlink" href="staffpanel.php?tool=shit_list&amp;action=shit_list&amp;action2=delete&amp;shit_list_id=' . (int) $shit_list['suspect_id'] . '" title="remove this toad from your shit list">Remove</a>


      <a class="altlink" href="sendmessage.php?receiver=' . (int) $shit_list['suspect_id'] . '" title="send a PM to this evil toad">Send PM</a></td>
      <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="left" valign="top">' . $shit . '

      <b>joined:</b> ' . get_date($shit_list['added'], '') . '
 
      [ ' . get_date($shit_list['added'], '', 0, 1) . ' ]

      <b>added to shit list:</b> ' . get_date($shit_list['shit_list_added'], '') . '

      [ ' . get_date($shit_list['shit_list_added'], '', 0, 1) . ' ]

      <b>last seen:</b> ' . get_date($shit_list['last_access'], '') . ' 

      [ ' . get_date($shit_list['last_access'], '', 0, 1) . ' ]<hr />
      ' . format_comment($shit_list['text']) . '</td>' . ($i % 2 == 0 ? '</tr><tr><td class="colhead" align="center" colspan="4"></td></tr>' : '');
        $i++;
    }
}
//=== end while
$HTMLOUT .= $i % 2 == 0 ? '<td class="one" align="center" colspan="2"></td></tr>' : '';
$HTMLOUT .= '</table><p align="center"><a class="altlink" href="users.php">Find Member / Browse Member List</a></p>';
echo stdhead('Shit list for ' . htmlsafechars($CURUSER['username'])) . $HTMLOUT . stdfoot();
コード例 #27
0
ファイル: comments.php プロジェクト: lavanoid/TorrentTrader3
        show_error_msg(T_("COMPLETED"), "Your Comment was added successfully.", 0);
    } else {
        show_error_msg(T_("ERROR"), T_("UNABLE_TO_ADD_COMMENT"), 0);
    }
}
//end insert comment
//NEWS
if ($type == "news") {
    $res = SQL_Query_exec("SELECT * FROM news WHERE id = {$id}");
    $row = mysql_fetch_array($res);
    if (!$row) {
        show_error_msg(T_("ERROR"), "News id invalid", 0);
        stdfoot();
    }
    begin_frame(T_("NEWS"));
    echo htmlspecialchars($row['title']) . "<br /><br />" . format_comment($row['body']) . "<br />";
    end_frame();
}
//TORRENT
if ($type == "torrent") {
    $res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = {$id}");
    $row = mysql_fetch_array($res);
    if (!$row) {
        show_error_msg(T_("ERROR"), "News id invalid", 0);
        stdfoot();
    }
    echo "<center><b>" . T_("COMMENTSFOR") . "</b> <a href='torrents-details.php?id=" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</a></center><br />";
}
begin_frame(T_("COMMENTS"));
$subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE {$type} = {$id}");
$subrow = mysql_fetch_array($subres);
コード例 #28
0
ファイル: userdetails.php プロジェクト: CharlieHD/U-232-V2
        }
        $completed .= "</table>\n";
    }
    if ($completed && $CURUSER['class'] >= UC_POWER_USER || $completed && $user['id'] == $CURUSER['id']) {
        if (!isset($_GET['completed'])) {
            $HTMLOUT .= tr('<b>' . $lang['userdetails_completedt'] . '</b><br />', '[ <a href=\'./userdetails.php?id=' . $id . '&amp;completed=1#completed\' class=\'sublink\'>Show</a> ]&nbsp;&nbsp;-&nbsp;' . mysql_num_rows($r), 1);
        } elseif (mysql_num_rows($r) == 0) {
            $HTMLOUT .= tr('<b>' . $lang['userdetails_completedt'] . '</b><br />', '[ <a href=\'./userdetails.php?id=' . $id . '&amp;completed=1\' class=\'sublink\'>Show</a> ]&nbsp;&nbsp;-&nbsp;' . mysql_num_rows($r), 1);
        } else {
            $HTMLOUT .= tr('<a name=\'completed\'><b>' . $lang['userdetails_completedt'] . '</b></a><br />[ <a href=\'./userdetails.php?id=' . $id . '#history\' class=\'sublink\'>Hide list</a> ]', $completed, 1);
        }
    }
}
//==End hnr
if ($user["info"]) {
    $HTMLOUT .= "<tr valign='top'><td align='left' colspan='2' class='text' bgcolor='#F4F4F0'>" . format_comment($user["info"]) . "</td></tr>\n";
}
if ($CURUSER["id"] != $user["id"]) {
    if ($CURUSER['class'] >= UC_STAFF) {
        $showpmbutton = 1;
    } elseif ($user["acceptpms"] == "yes") {
        $r = sql_query("SELECT id FROM blocks WHERE userid={$user['id']} AND blockid={$CURUSER['id']}") or sqlerr(__FILE__, __LINE__);
        $showpmbutton = mysql_num_rows($r) == 1 ? 0 : 1;
    } elseif ($user["acceptpms"] == "friends") {
        $r = sql_query("SELECT id FROM friends WHERE userid={$user['id']} AND friendid={$CURUSER['id']}") or sqlerr(__FILE__, __LINE__);
        $showpmbutton = mysql_num_rows($r) == 1 ? 1 : 0;
    }
}
if (isset($showpmbutton)) {
    $HTMLOUT .= "<tr>\r\n      <td colspan='2' align='center'>\r\n      <form method='get' action='sendmessage.php'>\r\n        <input type='hidden' name='receiver' value='{$user["id"]}' />\r\n        <input type='submit' value='{$lang['userdetails_msg_btn']}' class='btn' />\r\n      </form>\r\n      </td></tr>";
}
コード例 #29
0
ファイル: shoutbox.php プロジェクト: CharlieHD/U-232-V3
        foreach ($shouts as $arr) {
            if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
                continue;
            }
            $private = '';
            if ($arr['to_user'] == $CURUSER['id'] && $arr['to_user'] > 0) {
                $private = "<a href=\"javascript:private_reply('" . htmlsafechars($arr['username']) . "')\"><img src=\"{$INSTALLER09['pic_base_url']}private-shout.png\" alt=\"Private shout\" title=\"Private shout! click to reply to " . htmlsafechars($arr['username']) . "\" width=\"16\" style=\"padding-left:2px;padding-right:2px;\" border=\"0\" /></a>";
            }
            $edit = $CURUSER['class'] >= UC_STAFF || $arr['userid'] == $CURUSER['id'] && ($CURUSER['class'] >= UC_POWER_USER && $CURUSER['class'] <= UC_STAFF) ? "<a href='{$INSTALLER09['baseurl']}/shoutbox.php?edit=" . (int) $arr['id'] . "&amp;user="******"'><img src='{$INSTALLER09['pic_base_url']}button_edit2.gif' border='0' alt=\"Edit Shout\"  title=\"Edit Shout\" /></a> " : "";
            $del = $CURUSER['class'] >= UC_STAFF ? "<a href='./shoutbox.php?del=" . (int) $arr['id'] . "'><img src='{$INSTALLER09['pic_base_url']}button_delete2.gif' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "";
            $delall = $CURUSER['class'] == UC_MAX ? "<a href='./shoutbox.php?delall' onclick=\"confirm_delete(); return false;\"><img src='{$INSTALLER09['pic_base_url']}del.png' border='0' alt=\"Empty Shout\" title=\"Empty Shout\" /></a> " : "";
            //$delall
            $pm = $CURUSER['id'] != $arr['userid'] ? "<span class='date' style=\"color:{$dtcolor}\"><a target='_blank' href='./pm_system.php?action=send_message&amp;receiver=" . (int) $arr['userid'] . "'><img src='{$INSTALLER09['pic_base_url']}button_pm2.gif' border='0' alt=\"Pm User\" title=\"Pm User\" /></a></span>\n" : "";
            $date = get_date($arr["date"], 0, 1);
            $reply = $CURUSER['id'] != $arr['userid'] ? "<a href=\"javascript:window.top.SmileIT('[b][i]=>&nbsp;[color=#" . get_user_class_color($arr['class']) . "]" . ($arr['perms'] & bt_options::PERMS_STEALTH ? "UnKnown" : htmlsafechars($arr['username'])) . "[/color]&nbsp;-[/i][/b]','shbox','shbox_text')\"><img height='10' src='{$INSTALLER09['pic_base_url']}reply.gif' title='Reply' alt='Reply' style='border:none;' /></a>" : "";
            $user_stuff = $arr;
            $user_stuff['id'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['id'] = $INSTALLER09['bot_id'] . "") : "" . ($user_stuff['id'] = (int) $arr['userid'] . "");
            $user_stuff['username'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['username'] = '******' . "") : "" . ($user_stuff['username'] = htmlsafechars($arr['username']) . "");
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>[{$date}]</span>\n{$del}{$edit}{$pm}{$reply}{$private} " . format_username($user_stuff, true) . "<span class='size2' style='color:{$fontcolor};'>" . format_comment($arr["text"]) . "\n</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    } else {
        //== If there are no shouts
        if (empty($shouts)) {
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>No shouts here</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    }
}
$HTMLOUT .= "</body></html>";
echo $HTMLOUT;
コード例 #30
0
ファイル: new_replies.php プロジェクト: CharlieHD/U-232-V2
        if ($arr_post_read[0] < $arr_unread['last_post'] && $posted) {
            //=== change colors
            $colour = ++$colour % 2;
            $class = $colour == 0 ? 'one' : 'two';
            $locked = $arr_unread['locked'] == 'yes';
            $sticky = $arr_unread['sticky'] == 'yes';
            $topic_poll = $arr_unread['poll_id'] > 0;
            $first_unread_poster = sql_query('SELECT added FROM posts WHERE status = \'ok\'  AND topic_id=' . $arr_unread['topic_id'] . ' ORDER BY id ASC LIMIT 1');
            $first_unread_poster_arr = mysql_fetch_row($first_unread_poster);
            $thread_starter = ($arr_unread['username'] !== '' ? print_user_stuff($arr_unread) : 'Lost [' . $arr_unread['id'] . ']') . '<br />' . get_date($first_unread_poster_arr[0], '');
            $topicpic = $arr_unread['post_count'] < 30 ? $locked ? 'lockednew' : 'topicnew' : ($locked ? 'lockednew' : 'hot_topic_new');
            $rpic = $arr_unread['num_ratings'] != 0 ? ratingpic_forums(ROUND($arr_unread['rating_sum'] / $arr_unread['num_ratings'], 1)) : '';
            $sub = sql_query('SELECT user_id FROM subscriptions WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $arr_unread['topic_id']);
            $subscriptions = mysql_num_rows($sub) > 0 ? 1 : 0;
            $icon = $arr_unread['icon'] == '' ? '<img src="pic/forums/topic_normal.gif" alt="Topic" title="Topic" />' : '<img src="pic/smilies/' . htmlspecialchars($arr_unread['icon']) . '.gif" alt="' . htmlspecialchars($arr_unread['icon']) . '" title="' . htmlspecialchars($arr_unread['icon']) . '" />';
            $first_post_text = tool_tip(' <img src="pic/forums/mg.gif" height="14" alt="Preview" title="Preview" />', format_comment($arr_unread['body']), 'Last Post Preview');
            $topic_name = ($sticky ? '<img src="pic/forums/pinned.gif" alt="Pinned" title="Pinned" /> ' : ' ') . ($topicpoll ? '<img src="pic/forums/poll.gif" alt="Poll" title="Poll" /> ' : ' ') . '
        		<a class="altlink" href="?action=view_topic&amp;topic_id=' . $arr_unread['topic_id'] . '" title="First post in thread">' . htmlentities($arr_unread['topic_name'], ENT_QUOTES) . '</a> 
				<a class="altlink" href="forums.php?action=view_topic&amp;topic_id=' . $arr_unread['topic_id'] . '&amp;page=0#' . $arr_post_read[0] . '" title="First unread post in this thread"><img src="pic/forums/last_post.gif" alt="First unread post" title="First unread post" /></a> 
        		' . ($posted ? '<img src="pic/forums/posted.gif" alt="Posted" title="Posted" /> ' : ' ') . ($subscriptions ? '<img src="pic/forums/subscriptions.gif" alt="subscribed" title="subscribed" /> ' : ' ') . ' <img src="pic/forums/new.gif" alt="New post in topic!" title="New post in topic!" />';
            //=== print here
            $HTMLOUT .= '<tr>
		<td class="' . $class . '" align="center"><img src="pic/forums/' . $topicpic . '.gif" alt="topic" title="topic" /></td>
		<td class="' . $class . '" align="center">' . $icon . '</td>
		<td align="left" valign="middle" class="' . $class . '">
		<table border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td  class="' . $class . '" align="left">' . $topic_name . $first_post_text . ' </td>
		<td class="' . $class . '" align="right">' . $rpic . '</td>
		</tr>
		</table>