Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Taliwind theme is ready to download
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Themes

2024-02-08 13:15:08
The development of taliwind theme is finished, I present to you taliwind 1.0 theme is basic for now, you need to fix some things before use, paste the following code in account-login.php:
<?php
// Updated login for sql security May 14 2023
require_once("backend/functions.php");
dbconn();
session_start();

if (!empty($_REQUEST["returnto"])) {
   if (!isset($_GET["nowarn"])) {
       $nowarn = T_("MEMBERS_ONLY");
   }
}

if (isset($_POST["username"]) && isset($_POST["password"])) {
   if (!empty($_POST["username"]) && !empty($_POST["password"])) {
       $username = filter_var($_POST["username"], FILTER_SANITIZE_STRING);
       $password = filter_var($_POST["password"], FILTER_SANITIZE_STRING);
       $password_hash = passhash($password);
$stmt = $GLOBALS["DBconnector"]->prepare("SELECT id, password, secret, status, enabled FROM users WHERE username = ? LIMIT 1");
$stmt->bind_param("s", $username);
$stmt->execute();

if ($stmt->error) {
die("Query failed: " . $stmt->error);
}
$res = $stmt->get_result();
$row = $res->fetch_assoc();

if ($row) {
if ($row["password"] !== $password_hash) {
$message = T_("LOGIN_INCORRECT");
} elseif ($row["status"] === "pending") {
$message = T_("ACCOUNT_PENDING");
} elseif ($row["enabled"] === "no") {
$message = T_("ACCOUNT_DISABLED");
       }
   } else {
       $message = T_("NO_EMPTY_FIELDS");
   }
   

   if (!$message) {
       logincookie($row["id"], $row["password"], $row["secret"]);
       $_SESSION['username'] = $_POST["username"];
       if (!empty($_POST["returnto"])) {
           header("Refresh: 0; url=" . $_POST["returnto"]);
           die();
       } else {
           header("Refresh: 0; url=index.php");
           die();
       }
   } else {
       show_error_msg(T_("ACCESS_DENIED"), $message, 1);
   }
}
}
logoutcookie();


?>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">

<div class="relative">
 <style>/* Stil za body element */
body {
   background-image: url('https://source.unsplash.com/random');
   background-size: cover;
   background-position: center;
   background-repeat: no-repeat;
}</style>


   <!-- Obrazec -->
   <div class="min-h-screen flex items-center justify-center">
       <div class="w-1/3 bg-white rounded-lg p-6 shadow-md">
           <form method="post" action="account-login.php">
               <img src="logo.png" alt="Logo" class="h-25 mx-auto" />
               <div class="mb-6">
                   <label for="username" class="text-lg font-bold">username</label>
                   <input type="text" id="username" name="username" class="w-full p-2 mt-2 border rounded" placeholder="username..." />
               </div>
               <div class="mb-6">
                   <label for="password" class="text-lg font-bold">Password</label>
                   <input type="password" id="password" name="password" class="w-full p-2 mt-2 border rounded" placeholder="enter password..." />
               </div>
               <div class="mb-6 text-center">
                   <button type="submit" class="bg-green-500 text-white py-2 px-4 rounded-full">LOGIN</button>
               </div>

               <?php
               if (!empty($_REQUEST["returnto"])) {
                   ?>
                   <input type="hidden" name="returnto" value="<?php echo cleanstr($_REQUEST["returnto"]); ?>" />
                   <?php
               }
               ?>
           </form>

           <p class="text-center">
               <a href="account-signup.php" class="text-orange-500">REGISTRACIJA</a> |
               <a href="account-recover.php" class="text-orange-500">POZABLJENI PODATKI</a>
           </p>
       </div>
   </div>
</div>



<?php
end_frame();
stdfoot();
?>
and the following code in torrents-search.php:

<?php
require_once("backend/functions.php");
dbconn();

//check permissions
if ($site_config["MEMBERSONLY"]){
loggedinonly();

if($CURUSER["view_torrents"]=="no")
show_error_msg(T_("ERROR"), T_("NO_TORRENT_VIEW"), 1);
}

function sqlwildcardesc($x){
   return str_replace(array("%","_"), array("\\%","\\_"), mysqli_real_escape_string($GLOBALS["DBconnector"],$x));
}

//GET SEARCH STRING
$searchstr = trim($_GET["search"]);
$cleansearchstr = searchfield($searchstr);
if (empty($cleansearchstr))
unset($cleansearchstr);

$thisurl = "torrents-search.php?";

$addparam = "";
$wherea = array();
$wherecatina = array();
$wherea[] = "banned = 'no'";

$wherecatina = array();
$wherecatin = "";
$res = SQL_Query_exec("SELECT id FROM categories");
while($row = mysqli_fetch_assoc($res)){
   if ($_GET["c$row[id]"]) {
       $wherecatina[] = $row[id];
       $addparam .= "c$row[id]=1&";
       $addparam .= "c$row[id]=1&";
       $thisurl .= "c$row[id]=1&";
   }
   $wherecatin = implode(", ", $wherecatina);
}
if ($wherecatin)
   $wherea[] = "category IN ($wherecatin)";


//include dead
if ($_GET["incldead"] == 1) {
$addparam .= "incldead=1&";
$thisurl .= "incldead=1&";
}elseif ($_GET["incldead"] == 2){
$wherea[] = "visible = 'no'";
$addparam .= "incldead=2&";
$thisurl .= "incldead=2&";
}else
$wherea[] = "visible = 'yes'";

// Include freeleech
if ($_GET["freeleech"] == 1) {
$addparam .= "freeleech=1&";
$thisurl .= "freeleech=1&";
$wherea[] = "freeleech = '0'";
} elseif ($_GET["freeleech"] == 2) {
$addparam .= "freeleech=2&";
$thisurl .= "freeleech=2&";
$wherea[] = "freeleech = '1'";
}



//include external
if ($_GET["inclexternal"] == 1) {
$addparam .= "inclexternal=1&";
$wherea[] = "external = 'no'";
}

if ($_GET["inclexternal"] == 2) {
$addparam .= "inclexternal=2&";
$wherea[] = "external = 'yes'";
}

//cat
if ($_GET["cat"]) {
       $wherea[] = "category = " . sqlesc($_GET["cat"]);
$wherecatina[] = sqlesc($_GET["cat"]);
       $addparam .= "cat=" . urlencode($_GET["cat"]) . "&";
$thisurl .= "cat=".urlencode($_GET["cat"])."&";
}

//language
if ($_GET["lang"]) {
   $wherea[] = "torrentlang = " . sqlesc($_GET["lang"]);
   $addparam .= "lang=" . urlencode($_GET["lang"]) . "&";
   $thisurl .= "lang=".urlencode($_GET["lang"])."&";
}

//parent cat
if ($_GET["parent_cat"]) {
$addparam .= "parent_cat=" . urlencode($_GET["parent_cat"]) . "&";
$thisurl .= "parent_cat=".urlencode($_GET["parent_cat"])."&";
}

$parent_cat = $_GET["parent_cat"];

$wherebase = $wherea;

if (isset($cleansearchstr)) {
$wherea[] = "MATCH (torrents.name) AGAINST ('".mysqli_real_escape_string($GLOBALS["DBconnector"],$searchstr)."' IN BOOLEAN MODE)";

$addparam .= "search=" . urlencode($searchstr) . "&";
$thisurl .= "search=".urlencode($searchstr)."&";
}

//order by
if ($_GET['sort'] && $_GET['order']) {
$column = '';
$ascdesc = '';
switch($_GET['sort']) {
case 'id': $column = "id"; break;
case 'name': $column = "name"; break;
case 'comments': $column = "comments"; break;
case 'size': $column = "size"; break;
case 'times_completed': $column = "times_completed"; break;
case 'seeders': $column = "seeders"; break;
case 'leechers': $column = "leechers"; break;
case 'category': $column = "category"; break;
default: $column = "id"; break;
}

switch($_GET['order']) {
case 'asc': $ascdesc = "ASC"; break;
case 'desc': $ascdesc = "DESC"; break;
default: $ascdesc = "DESC"; break;
}
} else {
$_GET["sort"] = "id";
$_GET["order"] = "desc";
$column = "id";
$ascdesc = "DESC";
}

$orderby = "ORDER BY torrents." . $column . " " . $ascdesc;
$pagerlink = "sort=" . $_GET['sort'] . "&order=" . $_GET['order'] . "&";

if (is_valid_id($_GET["page"]))
$thisurl .= "page=$_GET[page]&";


$where = implode(" AND ", $wherea);

if ($where != "")
$where = "WHERE $where";

$parent_check = "";
if ($parent_cat){
$parent_check = " AND categories.parent_cat=".sqlesc($parent_cat);
}


//GET NUMBER FOUND FOR PAGER
$res = SQL_Query_exec("SELECT COUNT(*) FROM torrents $where $parent_check");
$row = mysqli_fetch_array($res);
$count = $row[0];


if (!$count && isset($cleansearchstr)) {
$wherea = $wherebase;
$searcha = explode(" ", $cleansearchstr);
$sc = 0;
foreach ($searcha as $searchss) {
if (strlen($searchss) <= 1)
continue;
$sc++;
if ($sc > 5)
break;
$ssa = array();
foreach (array("torrents.name") as $sss)
$ssa[] = "$sss LIKE '%" . sqlwildcardesc($searchss) . "%'";
$wherea[] = "(" . implode(" OR ", $ssa) . ")";
}
if ($sc) {
$where = implode(" AND ", $wherea);
if ($where != "")
$where = "WHERE $where";
$res = SQL_Query_exec("SELECT COUNT(*) FROM torrents $where $parent_check");
$row = mysqli_fetch_array($res);
$count = $row[0];
}
}

//Sort by
if ($addparam != "") {
if ($pagerlink != "") {
if ($addparam[strlen($addparam)-1] != ";") { // & = &
$addparam = $addparam . "&" . $pagerlink;
} else {
$addparam = $addparam . $pagerlink;
}
}
} else {
$addparam = $pagerlink;
}



if ($count) {

//SEARCH QUERIES!
list($pagertop, $pagerbottom, $limit) = pager(20, $count, "torrents-search.php?" . $addparam);
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $parent_check $orderby $limit";
$res = SQL_Query_exec($query);

}else{
unset($res);
}

if (isset($cleansearchstr))
stdhead(T_("SEARCH_RESULTS_FOR")." \"" . htmlspecialchars($searchstr) . "\"");
else
stdhead(T_("BROWSE_TORRENTS"));

begin_frame(T_("SEARCH_TORRENTS"));

// get all parent cats
echo "<center><b>".T_("CATEGORIES").":</b> ";
$catsquery = SQL_Query_exec("SELECT distinct parent_cat FROM categories ORDER BY parent_cat");
echo " - <a href='torrents.php'>".T_("SHOWALL")."</a>";
while($catsrow = mysqli_fetch_assoc($catsquery)){
echo " - <a href='torrents.php?parent_cat=".urlencode($catsrow['parent_cat'])."'>$catsrow[parent_cat]</a>";
}
echo "</center>";

?>
<br /><br />

<center>
<form method="get" action="torrents-search.php">
<table border="0" align="center">
<tr align='right'>
<?php
$i = 0;
$cats = SQL_Query_exec("SELECT * FROM categories ORDER BY parent_cat, name");
while ($cat = mysqli_fetch_assoc($cats)) {
   $catsperrow = 5;
   print(($i && $i % $catsperrow == 0) ? "</tr><tr align='right'>" : "");
   print("<td style=\"padding-bottom: 2px;padding-left: 2px\"><a href='torrents.php?cat={$cat["id"]}'>".htmlspecialchars($cat["parent_cat"])." - " . htmlspecialchars($cat["name"]) . "</a> <input name='c{$cat["id"]}' type=\"checkbox\" " . (in_array($cat["id"], $wherecatina) || $_GET["cat"] == $cat["id"]  ? "checked='checked' " : "") . "value='1' /></td>\n");
   $i++;                                                                                                                                                                                                                                                                                                                
}
echo "</tr></table>";

//if we are browsing, display all subcats that are in same cat
if ($parent_cat){
   echo "<br /><br /><b>".T_("YOU_ARE_IN").":</b> <a href='torrents.php?parent_cat=$parent_cat'>$parent_cat</a><br /><b>".T_("SUB_CATS").":</b> ";
$subcatsquery = SQL_Query_exec("SELECT id, name, parent_cat FROM categories WHERE parent_cat='$parent_cat' ORDER BY name");
while($subcatsrow = mysqli_fetch_assoc($subcatsquery)){
$name = $subcatsrow['name'];
echo " - <a href='torrents.php?cat=$subcatsrow[id]'>$name</a>";
}
}

echo "<br /><br />";//some spacing

?>

   
<?php print(T_("SEARCH")); ?>
<input type="text" name="search" size="40" value="<?php echo  stripslashes(htmlspecialchars($searchstr)) ?>" />
<?php print(T_("IN")); ?>
<select name="cat">
<option value="0"><?php echo "(".T_("ALL")." ".T_("TYPES").")";?></option>
<?php


$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
$catdropdown .= "<option value=\"" . $cat["id"] . "\"";
if ($cat["id"] == $_GET["cat"])
$catdropdown .= " selected=\"selected\"";
$catdropdown .= ">" . htmlspecialchars($cat["parent_cat"]) . ": " . htmlspecialchars($cat["name"]) . "</option>\n";
}
?>
<?php echo  $catdropdown ?>
</select>

<br /><br />
<select name="incldead">
<option value="0"><?php echo T_("ACTIVE_TRANSFERS"); ?></option>
<option value="1" <?php if ($_GET["incldead"] == 1) echo "selected='selected'"; ?>><?php echo T_("INC_DEAD");?></option>
<option value="2" <?php if ($_GET["incldead"] == 2) echo "selected='selected'"; ?>><?php echo T_("ONLY_DEAD");?></option>
</select>
<select name="freeleech">
<option value="0"><?php echo T_("ALL"); ?></option>
<option value="1" <?php if ($_GET["freeleech"] == 1) echo "selected='selected'"; ?>><?php echo T_("NOT_FREELEECH");?></option>
<option value="2" <?php if ($_GET["freeleech"] == 2) echo "selected='selected'"; ?>><?php echo T_("ONLY_FREELEECH");?></option>
</select>

<?php if ($site_config["ALLOWEXTERNAL"]){?>
<select name="inclexternal">
<option value="0"><?php echo T_("LOCAL_EXTERNAL"); ?></option>
<option value="1" <?php if ($_GET["inclexternal"] == 1) echo "selected='selected'"; ?>><?php echo T_("LOCAL_ONLY");?></option>
<option value="2" <?php if ($_GET["inclexternal"] == 2) echo "selected='selected'"; ?>><?php echo T_("EXTERNAL_ONLY");?></option>
</select>
<?php } ?>

<select name="lang">
<option value="0"><?php echo "(".T_("ALL").")";?></option>
<?php
$lang = langlist();
$langdropdown = "";
foreach ($lang as $lang) {
$langdropdown .= "<option value=\"" . $lang["id"] . "\"";
if ($lang["id"] == $_GET["lang"])
$langdropdown .= " selected=\"selected\"";
$langdropdown .= ">" . htmlspecialchars($lang["name"]) . "</option>\n";
}

?>
<?php echo  $langdropdown ?>
</select>
<input type="submit" value="<?php print T_("SEARCH"); ?>" />
<br />
</form>
<?php print T_("SEARCH_RULES"); ?><br />
   </center>
   
<?php

if ($count) {
// New code (TorrentialStorm)
echo "<form id='sort' action=''><div align='right'>".T_("SORT_BY").": <select name='sort' onchange='window.location=\"{$thisurl}sort=\"+this.options[this.selectedIndex].value+\"&order=\"+document.forms[\"sort\"].order.options[document.forms[\"sort\"].order.selectedIndex].value'>";
echo "<option value='id'" . ($_GET["sort"] == "id" ? " selected='selected'" : "") . ">".T_("ADDED")."</option>";
echo "<option value='name'" . ($_GET["sort"] == "name" ? " selected='selected'" : "") . ">".T_("NAME")."</option>";
echo "<option value='comments'" . ($_GET["sort"] == "comments" ? " selected='selected'" : "") . ">".T_("COMMENTS")."</option>";
echo "<option value='size'" . ($_GET["sort"] == "size" ? " selected='selected'" : "") . ">".T_("SIZE")."</option>";
echo "<option value='times_completed'" . ($_GET["sort"] == "times_completed" ? " selected='selected'" : "") . ">".T_("COMPLETED")."</option>";
echo "<option value='seeders'" . ($_GET["sort"] == "seeders" ? " selected='selected'" : "") . ">".T_("SEEDERS")."</option>";
echo "<option value='leechers'" . ($_GET["sort"] == "leechers" ? " selected='selected'" : "") . ">".T_("LEECHERS")."</option>";
echo "</select> ";
echo "<select name='order' onchange='window.location=\"{$thisurl}order=\"+this.options[this.selectedIndex].value+\"&sort=\"+document.forms[\"sort\"].sort.options[document.forms[\"sort\"].sort.selectedIndex].value'>";
echo "<option selected='selected' value='asc'" . ($_GET["order"] == "asc" ? " selected='selected'" : "") . ">".T_("ASCEND")."</option>";
echo "<option value='desc'" . ($_GET["order"] == "desc" ? " selected='selected'" : "") . ">".T_("DESCEND")."</option>";
echo "</select>";
   echo "</div>";
echo "</form>";

// End
torrenttable($res);
print($pagerbottom);
}else {
   
    print("<div class='f-border'>");
    print("<div class='f-cat' width='100%'>".T_("NOTHING_FOUND")."</div>");
    print("<div>");
    print T_("NO_RESULTS");
    print("</div>");
    print("</div>");
   
}

if ($CURUSER)
SQL_Query_exec("UPDATE users SET last_browse=".gmtime()." WHERE id=$CURUSER[id]");


end_frame();
stdfoot();

?>
, and upload taliwind.rar to /themes directory / and don't forget to change the path to your logo in the header.php and in account-login.php you also need to change logo path. , taliwind theme v2.0 will be avible soon. Have a nice day
taliwind.rar
Download
Last edited by klemenvv on 2024-02-08 13:16:27
2024-02-08 17:49:22
Thanks mate, it is some parts of theme we missing here

https://prnt.sc/kMLancXvX6s9

Regards


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2024-02-08 17:49:40
2024-02-10 11:04:31
Thank you for sharing. @Botanicar, I dont think your link is working.
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2024-02-10 14:05:57
Maybe is it so, maybe not...
I'm not sure for that...
it can be my fault..
I apologize if it so

https://player.vimeo.com/video/911837104

Regards guys


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2024-02-10 14:06:38
2024-02-10 14:12:33
Yea, the theme is incomplete. I will try to modify it to my needs.
2024-02-10 14:39:45
oh, im sory i forgot to jaascript, i add it tomorow
2024-03-27 07:25:53
No java for us mate.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728