function comment_form()
{
    global $comment, $id, $cid;
    block_begin(NEW_COMMENT);
    $comment = str_replace('\\r\\n', "\n", $comment);
    ?>
    <center>
    <form enctype='multipart/form-data' name='comment' method='post'>
    <input type='hidden' name='info_hash' value='<?php 
    echo $id;
    ?>
' />
    <table class='lista' border='0' cellpadding='10'>
    <tr>
    <tr><td align='left' class='header'><?php 
    echo USER_NAME;
    ?>
:</td><td class='lista' align='left'><input name='user' type='text'  value='<?php 
    echo security::html_safe($_GET["usern"]);
    ?>
' size='20' maxlength='100' disabled; readonly></td></tr>
    <tr><td align='left' class='header'><?php 
    echo COMMENT_1;
    ?>
:</td><td class='lista' align='left'><?php 
    textbbcode("comment", "comment", security::html_safe(unesc($comment)));
    ?>
</td></tr>
    <tr><td class='header' colspan='2' align='center'><input type='submit' name='confirm' value='<?php 
    echo FRM_CONFIRM;
    ?>
' />&nbsp;&nbsp;&nbsp;<input type='submit' name='confirm' value='<?php 
    echo FRM_PREVIEW;
    ?>
' /></td></tr>
    </table>
    </form>
    </center>
    
    <?php 
    block_end();
}
Exemple #2
0
    }
    $deadchkbox .= " /> including dead torrents\n";
    $HTMLOUT .= " " . $catdropdown . " </select> " . $deadchkbox . " \r\n<input type='submit' value='Search!' class='btn' /></td></tr></table></form>\r\n<br />\n";
    $HTMLOUT .= "<form method='post' name='compose' action='viewoffers.php?new_offer'><a name='add' id='add'></a>\r\n<table border='1' cellspacing='0' width='750px' cellpadding='5'><tr><td class='colhead' align='left' colspan='2'>\r\nOffers are for Users with a good ratio who have uploaded at least " . $INSTALLER09['offer_gigs_upped'] . " gigs Only... Share and you shall recieve!</td></tr>\r\n<tr><td align='right'><b>Title</b></td><td align='left'><input type='text' size='40' name='offertitle' />\r\n<select name='category'><option value='0'>(Select a Category)</option>\n";
    $res2 = sql_query('SELECT id, name FROM categories order by name');
    $num = mysql_num_rows($res2);
    $catdropdown2 = '';
    for ($i = 0; $i < $num; ++$i) {
        $cats2 = mysql_fetch_assoc($res2);
        $catdropdown2 .= "<option value='" . $cats2['id'] . "'";
        $catdropdown2 .= ">" . htmlspecialchars($cats2['name']) . "</option>\n";
    }
    $HTMLOUT .= $catdropdown2 . " </select></td></tr>\r\n<tr><td align='right' valign='top'><b>Image</b></td>\r\n<td align='left'>\r\n<input type='text' name='picture' size='80' /><br />\r\n(Direct link to image, NO TAGS NEEDED! Will be shown in description)<br />\r\n<!--\r\n<a href='panel.php?tool=bitbucket' rel='external'><strong>Upload Image</strong></a>\r\n-->\r\n</td></tr>\r\n\r\n<tr><td align='right'><b>Description</b></td><td align='left'>\n";
    if ($INSTALLER09['textbbcode']) {
        require_once INCL_DIR . 'bbcode_functions.php';
        $HTMLOUT .= textbbcode('add_offer', 'body', '');
    } else {
        $HTMLOUT .= "<textarea name='body' rows='20' cols='80'></textarea>";
    }
    $HTMLOUT .= "</td></tr>\r\n<tr><td align='center' colspan='2'>\r\n<input type='submit' value='Okay' class='btn' /></td></tr></table>\r\n</form>\r\n<br /><br />\n";
}
$rescount = sql_query('SELECT id FROM offers LIMIT 1') or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($rescount) > 0) {
    $res = sql_query("SELECT users.username, offers.id, offers.userid, offers.cat, offers.offer, offers.added, categories.name, categories.image, uploaded, downloaded FROM users inner join offers ON offers.userid = users.id left join categories ON offers.cat = categories.id order by offers.id desc LIMIT 10") or sqlerr();
    $num = mysql_num_rows($res);
    $HTMLOUT .= "<table border='1' cellspacing='0' width='750px' cellpadding='5'>\r\n    <tr><td width='50px' class='colhead' align='left'>Category</td>\r\n    <td class='colhead' align='left'>Offer</td><td class='colhead' align='center'>Added</td>\r\n    <td class='colhead' align='center'>Offered By</td></tr>\n";
    foreach ($cats as $key => $value) {
        $change[$value['id']] = array('id' => $value['id'], 'name' => $value['name'], 'image' => $value['image']);
    }
    while ($arr = mysql_fetch_assoc($res)) {
        $addedby = "<td style='padding: 0px' align='center'><b><a href='userdetails.php?id={$arr['userid']}'>{$arr['username']}</a></b></td>";
            stderr('Error', 'Invalid expiry selection');
        }
        $expires = TIME_NOW + 86400 * $expiry;
        // 86400 seconds in one day.
        $created = TIME_NOW;
        $query = sprintf('INSERT INTO announcement_main ' . '(owner_id, created, expires, sql_query, subject, body) ' . 'VALUES (%s, %s, %s, %s, %s, %s)', sqlesc($CURUSER['id']), sqlesc($created), sqlesc($expires), sqlesc($ann_query), sqlesc($subject), sqlesc($body));
        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");
Exemple #4
0
    $aa = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT id FROM {$TABLE_PREFIX}users WHERE username='******'");
    $ar = mysqli_fetch_assoc($aa);
    $team_owner = $ar["id"];
    $query = "INSERT INTO {$TABLE_PREFIX}teams SET\tname = '{$team_name}', owner = '{$team_owner}' ,info = '{$team_description}', image = '{$team_image}'";
    $sql = mysqli_query($GLOBALS["___mysqli_ston"], $query);
    $tid = is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"])) ? false : $___mysqli_res;
    mysqli_query($GLOBALS["___mysqli_ston"], "UPDATE {$TABLE_PREFIX}users SET team = '{$tid}' WHERE id= '{$team_owner}'");
    if ($sql) {
        write_log("has created new team ({$team_name})", "edit");
        $success = TRUE;
    } else {
        $success = FALSE;
    }
}
$teamtpl = new bTemplate();
$desc = textbbcode("smolf3d", "team_description");
$addt = "<br>\n" . $language['TEAM_HEADER'] . "\n<form name='smolf3d' method='get' action='index.php'>\n<CENTER><table cellspacing=0 cellpadding=5 width=50%>\n<input type='hidden' name='page' value='admin'>\n<input type='hidden' name='user' value='{$CURUSER['uid']}'>\n<input type='hidden' name='code' value='{$CURUSER['random']}'>\n<input type='hidden' name='do' value='teams'>\n<tr><td class=header colspan=2 align=center>" . $language['TEAM_ADD'] . "</td></tr><tr>\n<tr><td class=header>" . $language['TEAM_NAME'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_name'></td></tr>\n<tr><td class=header>" . $language['TEAM_OWNER'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_owner'>" . $language['TEAM_ONE'] . "</td></tr>\n<tr><td class=header>" . $language['TEAM_DESC'] . "</td><td class=lista align=center valign=top><center>{$desc}</center></td></tr>\n\n<tr><td class=header>" . $language['TEAM_LOGO'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_image'><input type='hidden' name='add' value='true'></td></tr>\n<tr><td class=header colspan=2><div align='center'><input class=btn value='Add Team' type='Submit'></div></td></tr>\n</table></CENTER>";
$admintpl->set("add_team", $addt);
if ($success == TRUE) {
    $successadd = "<br><h2>Team successfully added!</h2>";
}
$admintpl->set("success", $successadd);
$close = "<br>\n</form>";
$admintpl->set("close", $close);
//ELSE Display Teams
$current = "\n<table class=main cellspacing=0 cellpadding=3 width=50%><tr><td class=header align=center colspan=6>" . $language['TEAM_CURR'] . "</td></tr><tr>\n<td class=header style=\"text-align:center\">" . $language['TEAM_ID_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_LOGO_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_NAME_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_OWNER_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_DESC_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_EDIT_H'] . "</td>";
$admintpl->set("current", $current);
$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;
Exemple #5
0
            stderr("{$lang['comment_error']}", "{$lang['comment_body']}");
        }
        $text = htmlsafechars($body);
        $editedat = TIME_NOW;
        if (isset($_POST['lasteditedby']) || $CURUSER['class'] < UC_STAFF) {
            sql_query("UPDATE comments SET text=" . sqlesc($text) . ", editedat={$editedat}, edit_name=" . sqlesc($CURUSER['username']) . ", editedby=" . sqlesc($CURUSER['id']) . " WHERE id=" . sqlesc($commentid)) or sqlerr(__FILE__, __LINE__);
        } else {
            sql_query("UPDATE comments SET text=" . sqlesc($text) . ", editedat={$editedat}, editedby=0 WHERE id=" . sqlesc($commentid)) or sqlerr(__FILE__, __LINE__);
        }
        header("Refresh: 0; url={$locale_link}.php?id=" . (int) $arr['tid'] . "{$extra_link}&viewcomm={$commentid}#comm{$commentid}");
        die;
    }
    $HTMLOUT = '';
    $HTMLOUT .= "<h1>{$lang['comment_edit']}'" . htmlsafechars($arr[$name]) . "'</h1>\n      <form method='post' action='comment.php?action=edit&amp;cid={$commentid}'>\n      <input type='hidden' name='locale' value='{$name}' />\n       <input type='hidden' name='tid' value='" . (int) $arr['tid'] . "' />\n      <input type='hidden' name='cid' value='{$commentid}' />";
    if ($INSTALLER09['BBcode'] && function_exists('textbbcode')) {
        $HTMLOUT .= textbbcode('comments', 'body', $arr["text"]);
    } else {
        $HTMLOUT .= "<textarea name='text' rows='10' cols='60'>" . htmlsafechars($arr["text"]) . "</textarea>";
    }
    $HTMLOUT .= '
      <br />' . ($CURUSER['class'] >= UC_STAFF ? '<input type="checkbox" value="lasteditedby" checked="checked" name="lasteditedby" id="lasteditedby" /> Show Last Edited By<br /><br />' : '') . ' <input type="submit" class="btn" value="' . $lang['comment_doit'] . '" /></form>';
    echo stdhead("{$lang['comment_edit']}'" . $arr[$name] . "'", true, $stdhead) . $HTMLOUT . stdfoot($stdfoot);
    die;
} elseif ($action == "delete") {
    if ($CURUSER['class'] < UC_STAFF) {
        stderr("{$lang['comment_error']}", "{$lang['comment_denied']}");
    }
    $commentid = isset($_GET['cid']) ? (int) $_GET['cid'] : 0;
    $tid = isset($_GET['tid']) ? (int) $_GET['tid'] : 0;
    if (!is_valid_id($commentid)) {
        stderr("{$lang['comment_error']}", "{$lang['comment_invalid_id']}");
Exemple #6
0
if (!defined('IN_OFFERS')) {
    exit('No direct script access allowed');
}
$rs = sql_query("SELECT o.*, c.id AS catid, c.name AS catname FROM offers AS o LEFT JOIN categories AS c ON (c.id=o.cat) WHERE o.id = {$id}") or sqlerr(__FILE__, __LINE__);
$numz = mysql_fetch_assoc($rs);
if ($CURUSER['id'] != $numz['userid'] && $CURUSER['class'] < UC_MODERATOR) {
    stderr('Error!', 'This is not your offer to edit.');
}
$s = htmlspecialchars($numz['offer']);
$catid = $numz['catid'];
$body = htmlspecialchars($numz['descr']);
$catname = $numz['catname'];
$s2 = "<select name='category'><option value='{$catid}'> {$catname} </option>\n";
foreach ($cats as $row) {
    $s2 .= "<option value='" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</option>\n";
}
$s2 .= "</select>\n";
$HTMLOUT .= "<br />\r\n<form method='post' name='compose' action='viewoffers.php?id={$id}&amp;take_offer_edit'><a name='add' id='add'></a>\r\n<table border='1' cellspacing='0' cellpadding='5'><tr><td align='left' colspan='2'>\r\n<h1 align='center'>Edit Offer : {$s}</h1>\r\n</td></tr>\r\n<tr><td align='right'><b>Title</b></td>\r\n<td align='left'><input type='text' size='40' name='offertitle' value='{$s}' /><b> Type</b> {$s2}</td></tr>\r\n<tr><td align='right' valign='top'><b>Image</b></td><td align='left'>\r\n<input type='text' name='picture' size='80' value='' />\r\n<br />(Direct link to image. NO TAG NEEDED! Will be shown in description)</td></tr>\r\n<tr><td align='right'><b>Description</b></td>\r\n\r\n<td align='left'>";
if ($INSTALLER09['textbbcode']) {
    require_once INCL_DIR . 'bbcode_functions.php';
    $HTMLOUT .= textbbcode('edit_offer', 'body', $body);
} else {
    $HTMLOUT .= "<textarea name='body' rows='10' cols='60'>{$body}</textarea>";
}
$HTMLOUT .= '</td></tr>';
if ($CURUSER['class'] >= UC_MODERATOR) {
    $HTMLOUT .= "<tr><td align='center' colspan='2'>Staff Only</td></tr>\r\n    <tr><td align='right'><b>Filled</b></td>\r\n    <td><input type='checkbox' name='filled'" . ($numz['torrentid'] != 0 ? " checked='checked'" : '') . " /></td></tr>\r\n    <tr><td align='right'><b>Accepted by ID</b></td><td>\r\n    <input type='text' size='10' value='{$numz['acceptedby']}' name='acceptedby' /></td></tr>\r\n    <tr><td align='right'>\r\n    <b>Torrent ID</b></td><td><input type='text' size='10' name='torrentid' value='{$numz['torrentid']}' /></td></tr>";
}
$HTMLOUT .= "<tr><td align='center' colspan='2'><input type='submit' value='Edit Offer' class='btn' /></td></tr></table></form><br />\n";
/////////////////////// HTML OUTPUT //////////////////////////////
print stdhead('Edit Offer') . $HTMLOUT . stdfoot();
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/
*/
$rs = sql_query("SELECT r.*, c.id AS catid, c.name AS catname FROM requests AS r LEFT JOIN categories AS c ON (c.id=r.cat) WHERE r.id = {$id}") or sqlerr(__FILE__, __LINE__);
$numz = mysqli_fetch_assoc($rs);
if ($CURUSER['id'] != $numz['userid'] && $CURUSER['class'] < UC_MODERATOR) {
    stderr("{$lang['error_error']}", "{$lang['error_not_yours1']}");
}
$s = htmlspecialchars($numz['request']);
$catid = $numz['catid'];
$body = htmlspecialchars($numz['descr']);
$catname = $numz['catname'];
$s2 = "<select name='category'><option value='{$catid}'> {$catname} </option>\n";
foreach ($cats as $row) {
    $s2 .= "<option value='" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</option>\n";
}
$s2 .= "</select>\n";
$HTMLOUT .= "<br />\n<form method='post' name='compose' action='viewrequests.php?id={$id}&amp;take_req_edit'><a name='add' id='add'></a>\n<table border='1' cellspacing='0' cellpadding='5'><tr><td align='left' colspan='2'>\n<h1 align='center'>{$lang['details_edit']} {$s}</h1>\n</td></tr>\n<tr><td align='right'><b>{$lang['add_title']}</b></td>\n<td align='left'><input type='text' size='40' name='requesttitle' value='{$s}' /><b> {$lang['req_type']}</b> {$s2}</td></tr>\n<tr><td align='right' valign='top'><b>{$lang['add_image']}</b></td><td align='left'>\n<input type='text' name='picture' size='80' value='' />\n<br />{$lang['add_direct_link']}</td></tr>\n<tr><td align='right'><b>{$lang['add_description']}</b></td>\n\n<td align='left'>";
if ($INSTALLER09['textbbcode']) {
    require_once INCL_DIR . 'bbcode_functions.php';
    $HTMLOUT .= textbbcode('edit_request', 'body', $body);
} else {
    $HTMLOUT .= "<textarea name='body' rows='10' cols='60'>{$body}</textarea>";
}
$HTMLOUT .= '</td></tr>';
if ($CURUSER['class'] >= UC_MODERATOR) {
    $HTMLOUT .= "<tr><td align='center' colspan='2'>{$lang['edit_staff']}</td></tr>\n    <tr><td align='right'><b>{$lang['details_filled']}</b></td>\n    <td><input type='checkbox' name='filled'" . ($numz['torrentid'] != 0 ? " checked='checked'" : '') . " /></td></tr>\n    <tr><td align='right'><b>{$lang['edit_filled_by']}</b></td><td>\n    <input type='text' size='10' value='{$numz['filledby']}' name='filledby' /></td></tr>\n    <tr><td align='right'>\n    <b>{$lang['edit_torrent_id']}</b></td><td><input type='text' size='10' name='torrentid' value='{$numz['torrentid']}' /></td></tr>";
}
$HTMLOUT .= "<tr><td align='center' colspan='2'><input type='submit' value='{$lang['details_edit']}' class='btn' /></td></tr></table></form><br />\n";
/////////////////////// HTML OUTPUT //////////////////////////////
echo stdhead('Edit Request') . $HTMLOUT . stdfoot();
            send_pm($gonderen, $degeri, $baslik, $mesajmetni);
            $dis .= "PM send to User <b>" . $degeri . "</b><br />";
        }
        $dis .= "</div>";
    }
    $admintpl->set("show_tasks", $dis);
    $admintpl->set("language", $language);
    $admintpl->set("final_result", true, true);
    $admintpl->set("display_result", false, true);
}
if ($readyto == "Go") {
    $mdiff = $_POST["diff"] * $s[$_POST["type"]];
    $admintpl->set("search_diff_title", "Search for difference >" . makesize($mdiff) . " and User Group = " . ($kullan == 0 ? "ALL" : $kullan));
    $admintpl->set("final_result", false, true);
    $admintpl->set("display_result", true, true);
    $admintpl->set("pm_bbcode", textbbcode("act", "mesajmetni", ""));
    if ($XBTT_USE) {
        $udownloaded = "u.downloaded+IFNULL(x.downloaded,0)";
        $uuploaded = "u.uploaded+IFNULL(x.uploaded,0)";
        $utables = "{$TABLE_PREFIX}users u LEFT JOIN xbt_users x ON x.uid=u.id";
    } else {
        $udownloaded = "u.downloaded";
        $uuploaded = "u.uploaded";
        $utables = "{$TABLE_PREFIX}users u";
    }
    if ($kullan == 0) {
        $q = do_sqlquery("SELECT u.id as fid, username, {$udownloaded} as downloaded, {$uuploaded} as uploaded, level, UNIX_TIMESTAMP(joined) as joined, UNIX_TIMESTAMP(lastconnect) as lastconnect FROM {$utables} LEFT JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id where (ABS({$udownloaded} - {$uuploaded}) > '" . $mdiff . "') ORDER BY ({$uuploaded} / {$udownloaded}) ASC", true);
    } else {
        $q = do_sqlquery("SELECT u.id as fid, username, {$udownloaded} as downloaded, {$uuploaded} as uploaded, level, UNIX_TIMESTAMP(joined) as joined, UNIX_TIMESTAMP(lastconnect) as lastconnect FROM {$utables} LEFT JOIN {$TABLE_PREFIX}users_level ul ON u.id_level=ul.id where (u.id_level='" . $kullan . "' and ABS({$udownloaded} - {$uuploaded}) > '" . $mdiff . "') ORDER BY ({$uuploaded} / {$udownloaded}) ASC", true);
    }
    $lusers = array();
 user<?php 
    print $n_pms > 1 ? 's' : '';
    ?>
!</h1>
<form name=compose method=post action=new_announcement.php>
<table border=1 cellspacing=0 cellpadding=5>
<tr>
<td colspan="2"><b>Subject: </b>
<input name="subject" type="text" size="76" value='<?php 
    print safe($subject);
    ?>
' ></td>
</tr>
<tr><td colspan="2"><div align="center">
<?php 
    textbbcode("compose", "body", $body);
    ?>
<!-- The following line is for backward compatability with scripts that don't
have the textbbcode() function installed in the global.php script -->
<!--<textarea name=msg cols=80 rows=15><?php 
    print safe($body);
    ?>
</textarea>-->

</div></td></tr>
<tr><td colspan="2" align=center>

<select name="expiry">

<?php 
    reset($days);
Exemple #10
0
    print "<input type=\"hidden\" name=\"returnto\" value=\"details.php?id={$arr["tid"]}&amp;viewcomm={$commentid}#comm{$commentid}\" />\n";
    print "<input type=\"hidden\" name=\"cid\" value=\"{$commentid}\" />\n";
    ?>

	<table class=main border=0 cellspacing=0 cellpadding=3>
	<tr>
	<td class="colhead">
<?php 
    print "Редактирование комментария к \"" . htmlspecialchars_uni($arr["name"]) . "\"";
    ?>
	</td>
	</tr>
	<tr>
	<td>
<?php 
    textbbcode("comment", "text", htmlspecialchars_uni($arr["text"]));
    ?>
	</td></tr></table>

<?php 
    print "<p><input type=\"submit\" value=\"Отредактировать\" /></p></form>\n";
    stdfoot();
    die;
} elseif ($action == "check" || $action == "checkoff") {
    $tid = intval($_GET["tid"]);
    if (!is_valid_id($tid)) {
        stderr($tracker_lang['error'], "Неверный идентификатор {$tid}.");
    }
    $docheck = mysql_fetch_array(sql_query("SELECT COUNT(*) FROM checkcomm WHERE checkid = " . $tid . " AND userid = " . $CURUSER["id"] . " AND torrent = 1"));
    if ($docheck[0] > 0 && $action == "check") {
        stderr($tracker_lang['error'], "<p>Вы уже подписаны на этот торрент.</p><a href=details.php?id={$tid}#startcomments>Назад</a>");
Exemple #11
0
    }
    $deadchkbox .= " />{$lang['add_incl_dead']}\n";
    $HTMLOUT .= " " . $catdropdown . " </select> " . $deadchkbox . " \r\n<input type='submit' value='{$lang['req_search']}' class='btn' /></td></tr></table></form>\r\n<br />\n";
    $HTMLOUT .= "<form method='post' name='compose' action='viewrequests.php?new_request'><a name='add' id='add'></a>\r\n<table border='1' cellspacing='0' width='750px' cellpadding='5'><tr><td class='colhead' align='left' colspan='2'>\r\n{$lang['add_good_ratio']}" . $TBDEV['req_gigs_upped'] . "{$lang['add_share']}</td></tr>\r\n<tr><td align='right'><b>{$lang['add_title']}</b></td><td align='left'><input type='text' size='40' name='requesttitle' />\r\n<select name='category'><option value='0'>{$lang['add_select_cat']}</option>\n";
    $res2 = mysql_query('SELECT id, name FROM categories order by name');
    $num = mysql_num_rows($res2);
    $catdropdown2 = '';
    for ($i = 0; $i < $num; ++$i) {
        $cats2 = mysql_fetch_assoc($res2);
        $catdropdown2 .= "<option value='" . $cats2['id'] . "'";
        $catdropdown2 .= ">" . htmlspecialchars($cats2['name']) . "</option>\n";
    }
    $HTMLOUT .= $catdropdown2 . " </select></td></tr>\r\n<tr><td align='right' valign='top'><b>{$lang['add_image']}</b></td>\r\n<td align='left'>\r\n<input type='text' name='picture' size='80' /><br />\r\n{$lang['add_direct_link']}<br />\r\n<!--\r\n<a href='panel.php?tool=bitbucket' rel='external'><strong>{$lang['add_upload_image']}</strong></a>\r\n-->\r\n</td></tr>\r\n\r\n<tr><td align='right'><b>{$lang['add_description']}</b></td><td align='left'>\n";
    if ($TBDEV['textbbcode']) {
        require_once 'include/bbcode_functions.php';
        $HTMLOUT .= textbbcode('add_request', 'body', '');
    } else {
        $HTMLOUT .= "<textarea name='body' rows='20' cols='80'></textarea>";
    }
    $HTMLOUT .= "</td></tr>\r\n<tr><td align='center' colspan='2'>\r\n<input type='submit' value='{$lang['add_ok']}' class='btn' /></td></tr></table>\r\n</form>\r\n<br /><br />\n";
}
$rescount = mysql_query('SELECT id FROM requests LIMIT 1') or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($rescount) > 0) {
    $res = mysql_query("SELECT users.username, requests.id, requests.userid, requests.cat, requests.request, requests.added, categories.name, categories.image, uploaded, downloaded FROM users inner join requests ON requests.userid = users.id left join categories ON requests.cat = categories.id order by requests.id desc LIMIT 10") or sqlerr();
    $num = mysql_num_rows($res);
    $HTMLOUT .= "<table border='1' cellspacing='0' width='750px' cellpadding='5'>\r\n    <tr><td width='50px' class='colhead' align='left'>{$lang['add_cat']}</td>\r\n    <td class='colhead' align='left'>{$lang['add_request']}</td><td class='colhead' align='center'>{$lang['req_added']}</td>\r\n    <td class='colhead' align='center'>{$lang['req_req_by']}</td></tr>\n";
    foreach ($cats as $key => $value) {
        $change[$value['id']] = array('id' => $value['id'], 'name' => $value['name'], 'image' => $value['image']);
    }
    while ($arr = mysql_fetch_assoc($res)) {
        $addedby = "<td style='padding: 0px' align='center'><b><a href='userdetails.php?id={$arr['userid']}'>{$arr['username']}</a></b></td>";
Exemple #12
0
<tr><td class="colhead" colspan="2">Выбранный шаблон: <?php 
echo $types[$type]["name"];
?>
</td></tr>
<?php 
tr("Название релиза", "<input type=\"text\" name=\"name\" size=\"80\" /><br />Пример: Смерть Президента (2006) DVDRip\n", 1);
tr("Постер", "<input type=\"text\" name=\"poster\" size=\"80\" /><br />Залить картинку на <a href=\"http://www.imageshack.us\">ImageShack</a>", 1);
?>
<tr><td width="" class="heading" valign="top" align="right">Верхний шаблон</td><td valign="top" align="left"><?php 
echo textbbcode("index", "top", $templates[$type]["toptemplate"]);
?>
</td></tr>
<tr><td width="" class="heading" valign="top" align="right">Средний шаблон</td><td valign="top" align="left"><?php 
echo textbbcode("index", "center", $templates[$type]["centertemplate"]);
?>
</td></tr>
<tr><td width="" class="heading" valign="top" align="right">Нижний шаблон</td><td valign="top" align="left"><?php 
echo textbbcode("index", "bottom", $templates[$type]["bottomtemplate"]);
?>
</td></tr>
<?php 
tr("Номер торрента", "<input type=\"text\" name=\"torrentid\" size=\"60\" /><br />Пример: {$DEFAULTBASEURL}/details.php?id=<b>6764</b><br />Выделенное жирным - и есть номер торрента\n", 1);
tr("URL IMDB", "<input type=\"text\" name=\"imdb\" size=\"60\" /><br />Пример: http://www.imdb.com/title/tt0408306/\n", 1);
tr("Категория", $categories, 1);
?>
<tr><td align="center" colspan="2"><input type="submit" value="Добавить" /></td></tr>
</table>
</form>

<?php 
stdfoot();
Exemple #13
0
    $tplnews["hidden_action"] = $action;
    $tplnews["hidden_id"] = $_GET["id"];
    $tplnews["news_title"] = $title;
    $tplnews["bbcode"] = textbbcode("news", "news", $news);
    $newstpl->set("news", $tplnews);
} elseif ($action == "add") {
    global $news, $title, $CURUSER, $language, $newstpl;
    $newstpl = new bTemplate();
    $newstpl->set("language", $language);
    $newstpl->set("ADD_EDIT", true, true);
    $tplnews = array();
    $tplnews["action"] = "index.php?page=news&amp;act=confirm";
    $tplnews["hidden_action"] = $action;
    $tplnews["hidden_id"] = $_GET["id"];
    $tplnews["news_title"] = $title;
    $tplnews["bbcode"] = textbbcode("news", "news", $news);
    $newstpl->set("news", $tplnews);
} elseif ($action == "confirm") {
    if (!isset($_POST["conferma"])) {
    } elseif ($_POST["conferma"] == $language["FRM_CONFIRM"]) {
        if (isset($_POST["news"]) && isset($_POST["title"])) {
            $news = $_POST["news"];
            $uid = $CURUSER["uid"];
            $title = $_POST["title"];
            if ($news == "" || $title == "") {
                err_msg($language["ERROR"], $language["ERR_INS_TITLE_NEWS"]);
            } else {
                $news = sqlesc($news);
                $title = sqlesc($title);
                $nid = intval($_POST["id"]);
                $action = $_POST['action'];
Exemple #14
0
    }
    $body = htmlspecialchars(unesc($num["descr"]));
    $s2 = "<select name=\"category\">\n";
    $cats = genrelist($browsecatmode);
    foreach ($cats as $row) {
        $s2 .= "<option value=\"" . $row["id"] . "\" " . ($row['id'] == $id2 ? " selected=\"selected\"" : "") . ">" . htmlspecialchars($row["name"]) . "</option>\n";
    }
    $s2 .= "</select>\n";
    stdhead($lang_offers['head_edit_offer'] . ": {$s}");
    $title = htmlspecialchars(trim($s));
    print "<form id=\"compose\" method=\"post\" name=\"compose\" action=\"?id=" . $id . "&amp;take_off_edit=1\">" . "<table width=\"940\" cellspacing=\"0\" cellpadding=\"3\"><tr><td class=\"colhead\" align=\"center\" colspan=\"2\">" . $lang_offers['text_edit_offer'] . "</td></tr>";
    tr($lang_offers['row_type'] . "<font color=\"red\">*</font>", $s2, 1);
    tr($lang_offers['row_title'] . "<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px\" name=\"name\" value=\"" . $title . "\" />", 1);
    tr($lang_offers['row_post_or_photo'], "<input type=\"text\" name=\"picture\" style=\"width: 650px\" value='' /><br />" . $lang_offers['text_link_to_picture'], 1);
    print "<tr><td class=\"rowhead\" align=\"right\" valign=\"top\"><b>" . $lang_offers['row_description'] . "<font color=\"red\">*</font></b></td><td class=\"rowfollow\" align=\"left\">";
    textbbcode("compose", "body", $body, false);
    print "</td></tr>";
    print "<tr><td class=\"toolbox\" style=\"vertical-align: middle; padding-top: 10px; padding-bottom: 10px;\" align=\"center\" colspan=\"2\"><input id=\"qr\" type=\"submit\" value=\"" . $lang_offers['submit_edit_offer'] . "\" class=\"btn\" /></td></tr></table></form><br />\n";
    stdfoot();
    die;
}
//=== end edit offer
//==== take offer edit
if ($_GET["take_off_edit"]) {
    $take_off_edit = 0 + $_GET["take_off_edit"];
    if ($take_off_edit != '1') {
        stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
    }
    $id = 0 + $_GET["id"];
    $res = sql_query("SELECT userid FROM offers WHERE id = {$id}") or sqlerr(__FILE__, __LINE__);
    $num = mysql_fetch_array($res);
Exemple #15
0
 print "<tr><td class=\"colhead\" colspan=\"2\">Редактировать торрент</td></tr>";
 if ($row['multitracker'] == 'no') {
     tr($tracker_lang['torrent_file'], "<input type=file name=tfile size=80>\n", 1);
 }
 // disable torrent update for multitracked ones
 tr($tracker_lang['torrent_name'], "<input type=\"text\" name=\"name\" value=\"" . $row["name"] . "\" size=\"80\" />", 1);
 tr($tracker_lang['img_poster'], "<input type=radio name=img1action value='keep' checked>Оставить постер&nbsp&nbsp" . "<input type=radio name=img1action value='delete'>Удалить постер&nbsp&nbsp" . "<input type=radio name=img1action value='update'>Обновить постер<br /><b>Постер:</b>&nbsp&nbsp<input type=file name=image0 size=80>", 1);
 tr($tracker_lang['images'], "<input type=radio name=img2action value='keep' checked>Оставить скриншот №1&nbsp&nbsp" . "<input type=radio name=img2action value='delete'>Удалить скриншот №1&nbsp&nbsp" . "<input type=radio name=img2action value='update'>Обновить скриншот №1<br /><b>Картинка №2:</b>&nbsp&nbsp<input type=file name=image1 size=80><br /><br />" . "<input type=radio name=img3action value='keep' checked>Оставить скриншот №2&nbsp&nbsp" . "<input type=radio name=img3action value='delete'>Удалить скриншот №2&nbsp&nbsp" . "<input type=radio name=img3action value='update'>Обновить скриншот №2<br /><b>Картинка №3:</b>&nbsp&nbsp<input type=file name=image2 size=80><br /><br />" . "<input type=radio name=img4action value='keep' checked>Оставить скриншот №3&nbsp&nbsp" . "<input type=radio name=img4action value='delete'>Удалить скриншот №3&nbsp&nbsp" . "<input type=radio name=img4action value='update'>Обновить скриншот №3<br /><b>Картинка №4:</b>&nbsp&nbsp<input type=file name=image3 size=80><br /><br />" . "<input type=radio name=img5action value='keep' checked>Оставить скриншот №4&nbsp&nbsp" . "<input type=radio name=img5action value='delete'>Удалить скриншот №4&nbsp&nbsp" . "<input type=radio name=img5action value='update'>Обновить скриншот №4<br /><b>Картинка №5:</b>&nbsp&nbsp<input type=file name=image4 size=80>", 1);
 if (strpos($row["ori_descr"], "<") === false || strpos($row["ori_descr"], "&lt;") !== false) {
     $c = "";
 } else {
     $c = " checked";
 }
 //tr("Описание", "<textarea name=\"descr\" rows=\"10\" cols=\"80\">" . htmlspecialchars_uni($row["ori_descr"]) . "</textarea><br />(HTML <b>не</b> разрешен. Нажмите <a href=tags.php>сюда</a> для получения информации о тегах.)", 1);
 print "<tr><td class=rowhead style='padding: 3px'>" . $tracker_lang['description'] . "</td><td>";
 textbbcode("edit", "descr", htmlspecialchars_uni($row["ori_descr"]));
 print "</td></tr>\n";
 $s = "<select name=\"type\">\n";
 $cats = genrelist();
 foreach ($cats as $subrow) {
     $s .= "<option value=\"" . $subrow["id"] . "\"";
     if ($subrow["id"] == $row["category"]) {
         $s .= " selected=\"selected\"";
     }
     $s .= ">" . htmlspecialchars_uni($subrow["name"]) . "</option>\n";
 }
 $s .= "</select>\n";
 tr("Тип", $s, 1);
 tr("Видимый", "<input type=\"checkbox\" name=\"visible\"" . ($row["visible"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" />\r\n\t\t\t\t\tВидимый в торрентах<br /><table border=0 cellspacing=0 cellpadding=0 width=420><tr><td class=embedded>Обратите внимание, что торрент автоматически станет видимым когда появиться раздающий и автоматически перестанет быть видимым (станет мертвяком) когда не будет раздающего некоторое время.\r\n\t\t\t\t\tИспользуйте этот переключатель для ускорения процеса. Также учтите что невидимые торренты (мертвяки) все-равно могут быть просмотрены и найдены, это просто не по-умолчанию.</td></tr></table>", 1);
 if (get_user_class() >= UC_ADMINISTRATOR) {
     tr("Забанен", "<input type=\"checkbox\" name=\"banned\"" . ($row["banned"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" />", 1);
Exemple #16
0
        $mc1->add_value('editedby_' . $id, $mod_cache_name, $INSTALLER09['expires']['ismoddin']);
    }
    $HTMLOUT .= '<div class="row"><div class="col-sm-4 col-sm-offset-1"><h1><font size="+1"><font color="#FF0000">' . $mod_cache_name . '</font> is currently editing this torrent!</font></h1></div></div>';
}
$ismodd = '<div class="row"><div class="col-sm-12"><b>Edit Torrent</b> ' . ($CURUSER['class'] > UC_UPLOADER ? '<small><a href="edit.php?id=' . $id . '&amp;unedit=1">Click here</a> to add temp edit notification while you edit this torrent</small>' : '') . '</div></div>';
$HTMLOUT .= "<form method='post' name='edit' action='takeedit.php' enctype='multipart/form-data'><input type='hidden' name='id' value='{$id}' />";
if (isset($_GET["returnto"])) {
    $HTMLOUT .= "<input type='hidden' name='returnto' value='" . htmlsafechars($_GET["returnto"]) . "' />";
}
$HTMLOUT .= "<div class='panel inverse' style='width:82%; margin-left:9%;'>\n<div class='row'><div class='col-sm-12'>{$ismodd}</div></div>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='{$lang['edit_imdb_url']}' type='text' name='url' value='" . htmlsafechars($row["url"]) . "'></div></div><br>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='{$lang['edit_poster']}' type='text' name='poster' value='" . htmlsafechars($row["poster"]) . "'><br />{$lang['edit_poster1']}\n</div></div><br>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='Edit Tube' type='text' name='youtube' value='" . htmlsafechars($row["youtube"]) . "'><br />{$lang['edit_youtube_info']}\n</div></div><br>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='{$lang['edit_torrent_name']}' type='text' name='name' value='" . htmlsafechars($row["name"]) . "'></div>\n</div><br>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='{$lang['edit_torrent_tags']}' type='text' name='tags' value='" . htmlsafechars($row["tags"]) . "'><br />({$lang['edit_tags_info']})\n</div>\n</div><br>\n<div class='row'><div class='col-sm-12'><input class='form-control' placeholder='{$lang['edit_torrent_description']}' type='text' name='description' value='" . htmlsafechars($row["description"]) . "'></div>\n</div><br>\n<div class='row'><div class='col-sm-12'>{$lang["edit_nfo"]}:<input type='radio' name='nfoaction' value='keep' checked='checked' />{$lang['edit_keep_current']}<br /><input type='radio' name='nfoaction' value='update' />{$lang['edit_update']}<br /><input type='file' name='nfo' size='80' /> </div>\n</div><br>";
if (strpos($row["ori_descr"], "<") === false || strpos($row["ori_descr"], "&lt;") !== false) {
    $c = "";
} else {
    $c = " checked";
}
$HTMLOUT .= "\n<div class='row'><div class='col-sm-12'>{$lang['edit_description']}, '" . textbbcode("edit", "descr", "" . htmlspecialchars($row['ori_descr']) . "") . "'<br />{$lang['edit_tags']}</div></div><br>";
$s = "<br><select class='form-control' name='type'>";
$cats = genrelist();
foreach ($cats as $subrow) {
    $s .= "<option value='" . (int) $subrow["id"] . "'";
    if ($subrow["id"] == $row["category"]) {
        $s .= " selected='selected'";
    }
    $s .= ">" . htmlsafechars($subrow["name"]) . "</option>\n";
}
$s .= "</select>\n";
$HTMLOUT .= "<div class='row'>\n<div class='col-sm-3'>{$lang['edit_type']}:{$s}</div>";
require_once CACHE_DIR . 'subs.php';
$subs_list = '';
$subs_list .= "";
$i = 0;
Exemple #17
0
         $category = 0;
     }
     $combo_categories = categories($category[0]);
     $gold_level = '';
     $res = get_result("SELECT * FROM {$TABLE_PREFIX}gold  WHERE id='1'", true);
     foreach ($res as $key => $value) {
         $gold_level = $value["level"];
     }
     if ($gold_level > $CURUSER['id_level']) {
         $uploadtpl->set("upload_gold_level", false, true);
     } else {
         $uploadtpl->set("upload_gold_level", true, true);
     }
     $gold_select_box = createGoldCategories();
     $uploadtpl->set("upload_gold_combo", $gold_select_box);
     $bbc = textbbcode("upload", "info");
     $uploadtpl->set("upload.announces", $announcs);
     $uploadtpl->set("upload_categories_combo", $combo_categories);
     $uploadtpl->set("textbbcode", $bbc);
     if ($CURUSER['trusted'] == 'yes') {
         $moder = "ok";
     } else {
         $moder = "um";
     }
     $uploadtpl->set("moder", $moder);
     // moder
     $uploadtpl->set("imageon", $GLOBALS["imageon"] == "true", TRUE);
     $uploadtpl->set("screenon", $GLOBALS["screenon"] == "true", TRUE);
     $tplfile = "upload";
     break;
 case 1:
Exemple #18
0
        }
        if ($arr['solved'] === 'ignored') {
            echo '<tr><td align=right class=clearalt6><b>Problem</b></td><td align=left class=clearalt6><textarea name=msg_problem cols=80 rows=15>' . $arr['msg_problem'] . '</textarea></td></tr>' . '<tr><td align=right class=colhead><b>Solved</b></td><td align=left class=colhead><font color=orange><b>Ignored</b></font>&nbsp;on&nbsp;<b>' . $arr['solved_date'] . '</b>&nbsp;by&nbsp;<a class=altlink href=userdetails.php?id=' . $arr['solved_by'] . '><b>' . ($solved_by_arr['username'] == '' ? 'Deleted Staff' : $solved_by_arr['username']) . '</b></a></td></tr>' . '</table>';
        }
        if ($arr['solved'] === 'no') {
            // === Standard HelpDesk Replies
            $hd_reply['1'] = array('Answer Is In The FAQ', 'First Read The FAQ!!! Your question is answered in the FAQ!');
            $hd_reply['2'] = array('Answer Is In The Forums', 'Search the FORUMS!!! Your question has been answered in the FORUMS!');
            $hd_reply['3'] = array('Allowed / Banned clients', 'A list of Allowed AND banned clients can be found listed HERE in the FAQ!');
            $hd_reply['4'] = array('Stats Not Updating / Counting', 'Sometimes there is a delay in Stats updating ' . $SITENAME . '\'s stats are generally updated every ' . mkprettytime($autoclean_interval) . ' min. however sometimes the site is slower to respond... Give it a while, and the site will catch up.');
            $hd_reply['5'] = array('Die n00b', 'Die n00b! Such a thing is known even by my grandma!');
            $hd_answer = $_POST['hd_answer'];
            $body = $_POST['hd_answer'] !== '' ? $hd_reply[$hd_answer][1] : '';
            $addedbyid = 0 + $arr['added_by'];
            echo '<form method=post name=compose action=helpdesk.php><tr><td align=right class=clearalt6><b>Problem</b></td><td align=left class=clearalt6><textarea name=msg_problem cols=80 rows=15 READONLY style="background-color:#332831; color:#f5f0c1;">' . $arr['msg_problem'] . '</textarea></td></tr>' . '<tr><td align=right class=colhead><b>Solved</b></td><td align=center class=colhead align=left><font color=red><b>No</b></font><tr><td align=center class=clearalt7><b>Answer:</b></td><td align=center class=clearalt7>';
            textbbcode('compose', 'body', $body);
            echo '<input type=hidden name=id value=' . $id . '><input type=hidden name=addedbyid value=' . $addedbyid . '></td></tr>' . '<tr><td colspan=2 align=center class=clearalt7> <script language="javascript" src="spellmessage.js"></script> ' . '<input type=button class=button value="Spell Check" onclick="return openspell(1);"> <input type=submit value="Answer question" class=button> ' . ' <a class=altlink2 href=helpdesk.php?action=solve&pid=' . $id . '&solved=ignored><input type=submit value="Ignore question" class=button></a></form></td></tr>' . '<tr><td align=center colspan=2 class=colhead><form method=post action=helpdesk.php?action=problems&id=' . $id . '><b>General Help Desk Replies:</b> <select name=hd_answer>';
            // === add the standerd answers drop down
            for ($i = 1; $i <= count($hd_reply); $i++) {
                echo "<option value={$i} " . ($hd_answer == $i ? "selected" : "") . ">" . $hd_reply[$i][0] . "</option>\n";
            }
            echo '</select> <input type=submit value="Use the answer" class=button></form></td></tr></table>';
        }
    } else {
        // === add some javascript to make mass deleting fun and painless :P
        ?>
<script language = "Javascript">
<!--
var form='helpdesk'
function SetChecked(val,chkName) {
dml=document.forms[form];
Exemple #19
0
     $admintpl->set("rules_add", true, true);
     $admintpl->set("language", $language);
     $admintpl->set("rules_name", textbbcode("rules_add_new", "rules_name"));
     $admintpl->set("rules_description", "");
     $admintpl->set("rules_group", cat_combo());
     $admintpl->set("frm_action", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=save&amp;mode=new");
     $admintpl->set("rules_sort", "");
     break;
 case 'edit':
     if (isset($_GET["id"])) {
         // we should get only 1 style, selected with radio ...
         $id = max(0, $_GET["id"]);
         $cres = get_result("SELECT * FROM {$TABLE_PREFIX}rules WHERE id={$id}", true);
         $admintpl->set("rules_add", true, true);
         $admintpl->set("language", $language);
         $admintpl->set("rules_name", textbbcode("rules_add_new", "rules_name", $cres[0]["text"]));
         $admintpl->set("rules_sort", $cres[0]["sort_index"]);
         $admintpl->set("rules_group", cat_combo($cres[0]["cat_id"]));
         $admintpl->set("frm_action", "index.php?page=admin&amp;user="******"uid"] . "&amp;code=" . $CURUSER["random"] . "&amp;do=rules&amp;action=save&amp;mode=edit&amp;id={$id}");
         $admintpl->set("rules_sort", $cres[0]["sort_index"]);
     }
     break;
 case 'delete':
     if (isset($_GET["id"])) {
         // we should get only 1 style, selected with radio ...
         $id = max(0, $_GET["id"]);
         // delete style from database
         do_sqlquery("UPDATE {$TABLE_PREFIX}rules SET active = '-1' WHERE id={$id}", true);
         rules_read();
     }
     break;
    <tr><td align="right"><?php 
    echo T_("UPLOAD_ANONY");
    ?>
: </td><td><?php 
    printf("<input name='anonycheck' value='yes' type='radio' " . ($anonycheck ? " checked='checked'" : "") . " />" . T_("YES") . " <input name='anonycheck' value='no' type='radio' " . (!$anonycheck ? " checked='checked'" : "") . " />" . T_("NO") . "");
    ?>
 &nbsp;<i><?php 
    echo T_("UPLOAD_ANONY_MSG");
    ?>
</i>
    </td></tr>
	<?php 
}
print "<tr><td align='center' colspan='2'>" . T_("DESCRIPTION") . "</td></tr></table>";
require_once "backend/bbcode.php";
print textbbcode("upload", "descr", "{$descr}");
?>

<br /><br /><center><input type="submit" value="<?php 
echo T_("UPLOAD_TORRENT");
?>
" /><br />
<i><?php 
echo T_("CLICK_ONCE_IMAGE");
?>
</i>
</center>
</form>

<?php 
end_frame();
Exemple #21
0
$expectedtpl->set("ex18", "{$catdropdown}");
$expectedtpl->set("ex20", "</select>");
$expectedtpl->set("ex22", "{$deadchkbox}");
$expectedtpl->set("ex24", "<input type=submit value=" . $language["SEARCH"] . "  />");
$expectedtpl->set("ex26", "</form>");
$expectedtpl->set("ex28", "</td></tr></table><BR><HR><BR>");
$expectedtpl->set("ex30", "<br>\n");
$expectedtpl->set("ex32", "<table class=lista align='center' width='550' cellspacing=2><form name=expect method=post action=index.php?page=takeexpect><a name=add id=add></a>");
$expectedtpl->set("ex34", "<tr><td class=header align=center width=100% colspan=\"2\">" . $language["ADD_EXPECTED"] . "</td></tr>");
$expectedtpl->set("ex36", "<tr><td class=header align=left width=30%>" . $language["NAME"] . "</td><td class=lista align=left width=70%><input type=text size=40 name=expecttitle></td></tr>");
$expectedtpl->set("ex38", "<tr><td class=header align=left width=30%>" . $language["DATE_EXPECTED"] . "</td><td class=lista align=left width=70%><input type=text size=15 name=date>&nbsp;" . $language["TEXT_DTD"] . "</td></tr>");
$expectedtpl->set("ex40", "<tr><td class=header align=left width=30%>" . $language["CATEGORY"] . "</td><td class=lista align=left width=70%>");
$expectedtpl->set("ex42", "<select name=category>");
$expectedtpl->set("ex44", "<option value=0>" . $language["CHOOSE"] . "</option>");
$res2 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT id, name FROM {$TABLE_PREFIX}categories ORDER BY name");
$num = mysqli_num_rows($res2);
$catdropdown2 = "";
for ($i = 0; $i < $num; ++$i) {
    $cats2 = mysqli_fetch_assoc($res2);
    $catdropdown2 .= "<option value=\"" . $cats2["id"] . "\"";
    $catdropdown2 .= ">" . htmlspecialchars($cats2["name"]) . "</option>\n";
}
$expectedtpl->set("ex46", $catdropdown2);
$expectedtpl->set("ex48", "</select>");
$expectedtpl->set("ex50", "<br>\n");
$expectedtpl->set("ex52", "<tr><td class=header align=left width=30%>" . $language["DESCRIPTION"] . "</td><td class=lista align=left width=70%>");
$expectedtpl->set("ex54", textbbcode("expect", "description"));
$expectedtpl->set("ex56", "</td></tr>");
$expectedtpl->set("ex58", "<tr><td class=lista align=center width=100% colspan=\"2\"><center><input type=submit value='" . $language["FRM_CONFIRM"] . "'></center></td></tr>");
$expectedtpl->set("ex60", "</form>\n");
$expectedtpl->set("ex62", "</table></CENTER>\n");
Exemple #22
0
     if ($row['id_level'] >= 3) {
         if ($results["visible"] == $row['id_level']) {
             $selected = 'selected';
         } else {
             $selected = '';
         }
         $torrent['visible'] .= "<option value=" . $row['id_level'] . " " . $selected . ">" . $row['level'] . "</option>";
     }
 }
 $torrent['visible'] .= "</select>";
 /*End sticky by losmi*/
 $torrent["link"] = "index.php?page=edit&info_hash=" . $results["info_hash"] . "&returnto=" . urlencode($link);
 $torrent["filename"] = $results["filename"];
 $torrent["tag"] = $results["tag"];
 $torrent["info_hash"] = $results["info_hash"];
 $torrent["description"] = textbbcode("edit", "comment", unesc($results["comment"]));
 $torrent["size"] = makesize($results["size"]);
 include dirname(__FILE__) . "/include/offset.php";
 $torrent["date"] = date("d/m/Y", $results["data"] - $offset);
 $torrent["complete"] = $results["finished"] . " " . $language["X_TIMES"];
 $torrent["peers"] = $language["SEEDERS"] . ": " . $results["seeds"] . "," . $language["LEECHERS"] . ": " . $results["leechers"] . "=" . ($results["leechers"] + $results["seeds"]) . " " . $language["PEERS"];
 $torrent["cat_combo"] = categories($results["cat_name"]);
 //$s;
 if ($CURUSER['edit_torrents'] == "yes" && $CURUSER['moderate_trusted'] == 'yes') {
     switch ($moder_status) {
         case 'ok':
             $checked1 = "SELECTED";
             break;
         case 'bad':
             $checked2 = "SELECTED";
             break;
Exemple #23
0
				<?php 
tr($lang_upload['row_torrent_file'] . "<font color=\"red\">*</font>", "<input type=\"file\" class=\"file\" id=\"torrent\" name=\"file\" onchange=\"getname()\" />\n", 1);
if ($altname_main == 'yes') {
    tr($lang_upload['row_torrent_name'], "<b>" . $lang_upload['text_english_title'] . "</b>&nbsp;<input type=\"text\" style=\"width: 250px;\" name=\"name\" />&nbsp;&nbsp;&nbsp;\n<b>" . $lang_upload['text_chinese_title'] . "</b>&nbsp;<input type=\"text\" style=\"width: 250px\" name=\"cnname\"><br /><font class=\"medium\">" . $lang_upload['text_titles_note'] . "</font>", 1);
} else {
    tr($lang_upload['row_torrent_name'], "<input type=\"text\" style=\"width: 650px;\" id=\"name\" name=\"name\" /><br /><font class=\"medium\">" . $lang_upload['text_torrent_name_note'] . "</font>", 1);
}
if ($smalldescription_main == 'yes') {
    tr($lang_upload['row_small_description'], "<input type=\"text\" style=\"width: 650px;\" name=\"small_descr\" /><br /><font class=\"medium\">" . $lang_upload['text_small_description_note'] . "</font>", 1);
}
get_external_tr();
if ($enablenfo_main == 'yes') {
    tr($lang_upload['row_nfo_file'], "<input type=\"file\" class=\"file\" name=\"nfo\" /><br /><font class=\"medium\">" . $lang_upload['text_only_viewed_by'] . get_user_class_name($viewnfo_class, false, true, true) . $lang_upload['text_or_above'] . "</font>", 1);
}
print "<tr><td class=\"rowhead\" style='padding: 3px' valign=\"top\">" . $lang_upload['row_description'] . "<font color=\"red\">*</font></td><td class=\"rowfollow\">";
textbbcode("upload", "descr", "", false);
print "</td></tr>\n";
if ($allowtorrents) {
    $disablespecial = " onchange=\"disableother('browsecat','specialcat')\"";
    $s = "<select name=\"type\" id=\"browsecat\" " . ($allowtwosec ? $disablespecial : "") . ">\n<option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>\n";
    $cats = genrelist($browsecatmode);
    foreach ($cats as $row) {
        $s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
    }
    $s .= "</select>\n";
} else {
    $s = "";
}
if ($allowspecial) {
    $disablebrowse = " onchange=\"disableother('specialcat','browsecat')\"";
    $s2 = "<select name=\"type\" id=\"specialcat\" " . $disablebrowse . ">\n<option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>\n";
    echo "&nbsp;&nbsp;<a href='nfo-view.php?id=" . $row["id"] . "' target='_blank'>[" . T_("VIEW_CURRENT_NFO") . "]</a>";
} else {
    echo "&nbsp;&nbsp;<font color='#ff0000'>" . T_("NO_NFO_UPLOADED") . "</font>";
}
echo "<br /><input type='file' name='nfofile' size='60' /></td></tr>";
echo "<tr><td class='table_col1' align='right'><b>" . T_("CATEGORIES") . ": </b></td><td class='table_col2'>" . $catdropdown . "</td></tr>";
echo "<tr><td class='table_col1' align='right'><b>" . T_("LANG") . ": </b></td><td class='table_col2'>" . $langdropdown . "</td></tr>";
if ($CURUSER["edit_torrents"] == "yes") {
    echo "<tr><td class='table_col1' align='right'><b>" . T_("BANNED") . ": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"banned\"" . ($row["banned"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" /> " . T_("BANNED") . "?<br /></td></tr>";
}
echo "<tr><td class='table_col1' align='right'><b>" . T_("VISIBLE") . ": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"visible\"" . ($row["visible"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" /> " . T_("VISIBLEONMAIN") . "<br /></td></tr>";
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes") {
    echo "<tr><td class='table_col1' align='right'><b>" . T_("FREE_LEECH") . ": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"freeleech\"" . ($row["freeleech"] == "1" ? " checked=\"checked\"" : "") . " value=\"1\" />" . T_("FREE_LEECH_MSG") . "<br /></td></tr>";
}
if ($site_config['ANONYMOUSUPLOAD']) {
    echo "<tr><td class='table_col1' align='right'><b>" . T_("ANONYMOUS_UPLOAD") . ": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"anon\"" . ($row["anon"] == "yes" ? " checked=\"checked\"" : "") . " value=\"1\" />(" . T_("ANONYMOUS_UPLOAD_MSG") . ")<br /></td></tr>";
}
print "<tr><td class='table_head' align='center' colspan='2'><b>" . T_("DESCRIPTION") . ":</b></td></tr></table>";
require_once "backend/bbcode.php";
print textbbcode("bbform", "descr", htmlspecialchars($row["descr"]));
print "<br /><center><input type=\"submit\" value='" . T_("SUBMIT") . "' /> <input type='reset' value='" . T_("UNDO") . "' /></center>\n";
print "</form>\n";
end_frame();
begin_frame(T_("DELETE_TORRENT"));
print "<center><form method='post' action='torrents-edit.php?action=deleteit&amp;id={$id}'>\n";
print "<input type='hidden' name='torrentid' value='{$id}' />\n";
print "<input type='hidden' name='torrentname' value='" . htmlspecialchars($row["name"]) . "' />\n";
echo "<b>" . T_("REASON_FOR_DELETE") . "</b><input type='text' size='30' name='delreason' />";
echo "&nbsp;<input type='submit' value='" . T_("DELETE_TORRENT") . "' /></form></center>";
end_frame();
stdfoot();
Exemple #25
0
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;
}
Exemple #26
0
     <td align='left' class='lista'>
         <input type='text' name='title' size='40' maxlength='40' value='<?php 
echo $title;
?>
'/>
     </td>
  </tr>
  <tr>
     <td align='left' class='lista' valign='top' style='font-size:10pt'>
         <?php 
echo NEWS_DESCRIPTION;
?>
     </td>
      <td align='left' class='lista'>
  <?php 
echo textbbcode('news', 'news', security::html_safe($news));
?>
      </td>
  </tr>
  <tr>
  </tr>
  <tr>
     <td align='left' class='header'>
         <input type='submit' name='conferma' value='<?php 
echo FRM_CONFIRM;
?>
' />
     </td>
     <td align='left' class='header'>
         <input type='submit' name='conferma' value='<?php 
echo FRM_CANCEL;
Exemple #27
0
            $res = SQL_Query_exec("SELECT * FROM `messages` WHERE `sender` = {$CURUSER['id']} AND `location` = 'template' ORDER BY `subject`");
            if (mysql_num_rows($res)) {
                $tmp = "<select name=\"usetemplate\" onchange=\"toggleTemplate(this);\">\n<option name=\"0\">---</option>\n";
                while ($arr = mysql_fetch_assoc($res)) {
                    $tmp .= "<option value=\"{$arr['id']}\">{$arr['subject']}</option>\n";
                }
                $tmp .= "</select><br />\n";
                tr2("Template:", $tmp, 1);
            }
        }
        tr2("Subject:", "<input name=\"subject\" type=\"text\" size=\"60\" value=\"{$subject}\" />", 1);
        //
        //   tr2("Message","<textarea name=\"msg\" cols=\"50\" rows=\"15\">$msg</textarea>", 1);
        require_once "backend/bbcode.php";
        echo "</table>";
        print textbbcode("compose", "msg", "{$msg}");
        echo "<table width='600px' border='0' align='center' cellpadding='4' cellspacing='0'>";
        if (!isset($_GET['templates'])) {
            $output .= "<input type=\"submit\" name=\"send\" value=\"Send\" />&nbsp;<label><input type=\"checkbox\" name=\"save\" checked='checked' />Save Copy In Outbox</label>&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"submit\" name=\"draft\" value=\"Save Draft\" />&nbsp;";
        }
        tr2($output . "<input type=\"submit\" name=\"template\" value=\"Save Template\" />");
        echo "</table>";
        end_form();
        end_frame();
        stdfoot();
        die;
    }
    end_frame();
}
begin_frame($pagename);
echo "<center>";
Exemple #28
0
 print "<input type=\"hidden\" name=\"id\" value=\"{$id}\" />";
 if (isset($_GET["returnto"])) {
     print "<input type=\"hidden\" name=\"returnto\" value=\"" . htmlspecialchars($_GET["returnto"]) . "\" />";
 }
 print "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">\n";
 print "<tr><td class='colhead' colspan='2' align='center'>" . htmlspecialchars($row["name"]) . "</td></tr>";
 tr($lang_edit['row_torrent_name'] . "<font color=\"red\">*</font>", "<input type=\"text\" style=\"width: 650px;\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" />", 1);
 if ($smalldescription_main == 'yes') {
     tr($lang_edit['row_small_description'], "<input type=\"text\" style=\"width: 650px;\" name=\"small_descr\" value=\"" . htmlspecialchars($row["small_descr"]) . "\" />", 1);
 }
 get_external_tr($row["url"]);
 if ($enablenfo_main == 'yes') {
     tr($lang_edit['row_nfo_file'], "<font class=\"medium\"><input type=\"radio\" name=\"nfoaction\" value=\"keep\" checked=\"checked\" />" . $lang_edit['radio_keep_current'] . "<input type=\"radio\" name=\"nfoaction\" value=\"remove\" />" . $lang_edit['radio_remove'] . "<input id=\"nfoupdate\" type=\"radio\" name=\"nfoaction\" value=\"update\" />" . $lang_edit['radio_update'] . "</font><br /><input type=\"file\" name=\"nfo\" onchange=\"document.getElementById('nfoupdate').checked=true\" />", 1);
 }
 print "<tr><td class=\"rowhead\">" . $lang_edit['row_description'] . "<font color=\"red\">*</font></td><td class=\"rowfollow\">";
 textbbcode("edittorrent", "descr", $row["descr"], false);
 print "</td></tr>";
 $s = "<select name=\"type\" id=\"oricat\">";
 $cats = genrelist($sectionmode);
 foreach ($cats as $subrow) {
     $s .= "<option value=\"" . $subrow["id"] . "\"";
     if ($subrow["id"] == $row["category"]) {
         $s .= " selected=\"selected\"";
     }
     $s .= ">" . htmlspecialchars($subrow["name"]) . "</option>\n";
 }
 $s .= "</select>\n";
 if ($allowmove) {
     $s2 = "<select name=\"type\" id=newcat disabled>\n";
     $cats2 = genrelist($othermode);
     foreach ($cats2 as $subrow) {
Exemple #29
0
    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);
$commcount = $subrow[0];
if ($commcount) {
    list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id={$id}&amp;type={$type}&amp;");
    $commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE {$type} = {$id} ORDER BY comments.id {$limit}";
    $commres = SQL_Query_exec($commquery);
} else {
    unset($commres);
}
if ($commcount) {
    print $pagertop;
    commenttable($commres, $type);
    print $pagerbottom;
} else {
    print "<br /><b>" . T_("NOCOMMENTS") . "</b><br />\n";
}
echo "<center>";
echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type={$type}&amp;id={$id}&amp;takecomment=yes\">";
echo textbbcode("comment", "body") . "<br />";
echo "<input type=\"submit\"  value=\"" . T_("ADDCOMMENT") . "\" />";
echo "</form></center>";
end_frame();
stdfoot();
Exemple #30
0
         stderr($language["ERROR"], $language["ERR_PM_GUEST"]);
     }
     $res = do_sqlquery("select m.*, IF(m.sender=0,'System',u.username) as sendername FROM {$TABLE_PREFIX}messages m LEFT JOIN {$TABLE_PREFIX}users u on u.id=m.sender WHERE receiver={$uid} AND m.id={$id}", true);
     if (!$res) {
         err_msg($language["ERROR"], $language["BAD_ID"]);
         stdfoot();
         exit;
     } else {
         $result = mysql_fetch_array($res);
         $pmedittpl = array();
         $pmedittpl["frm_action"] = "index.php?page=usercp&amp;do=" . $do . "&amp;action=post&amp;uid=" . $uid . "&amp;what=" . htmlspecialchars($what) . "";
         $pmedittpl["receiver"] = $what != "new" ? unesc($result["sendername"]) : htmlspecialchars(urldecode($_GET["to"]));
         $pmedittpl["readonly"] = $what != "new" ? " readonly=\"readonly\"" : "";
         $pmedittpl["searchuser"] = $what == "new" ? "<a href=\"javascript:popusers('searchusers.php');\">" . $language["FIND_USER"] . "</a>" : "";
         $pmedittpl["subject"] = $what != "new" ? (strpos(unesc($result["subject"]), "Re:") === false ? "Re:" : "") . unesc($result["subject"]) : "";
         $pmedittpl["bbcode"] = textbbcode("edit", "msg", $what == "quote" ? "[quote=" . htmlspecialchars($result["sendername"]) . "]" . unesc($result["msg"]) . "[/quote]" : "");
         $pmedittpl["frm_preview"] = "index.php?page=usercp&amp;do=" . $do . "&amp;action=post&amp;uid=" . $uid . "&amp;what=" . htmlspecialchars($what) . "";
         $pmedittpl["frm_cancel"] = "index.php?page=usercp&amp;uid=" . $uid . "&amp;do=pm&amp;action=list";
         $usercptpl->set("pmedit", $pmedittpl);
     }
 } elseif ($what == "inbox" && $action == "read" || $what == "outbox" && $action == "read") {
     $usercptpl->set("MSG_READ", true, true);
     $id = intval($_GET["id"]);
     if ($what == "inbox") {
         $res = do_sqlquery("select m.*, IF(m.sender=0,'System',u.username) as sendername FROM {$TABLE_PREFIX}messages m LEFT JOIN {$TABLE_PREFIX}users u on u.id=m.sender WHERE receiver={$uid} AND m.id={$id}", true);
     } elseif ($what == "outbox") {
         $res = do_sqlquery("select m.*, IF(m.receiver=0,'System',u.username) as sendername FROM {$TABLE_PREFIX}messages m LEFT JOIN {$TABLE_PREFIX}users u on u.id=m.receiver WHERE sender={$uid} AND m.id={$id}", true);
     }
     if (mysql_num_rows($res) == "0") {
         err_msg($language["ERROR"], $language["BAD_ID"]);
         stdfoot();