📄 index.php
字号:
$content = ""._NOMATCHES."";
$content = char_dec($content);
echo _P_CENTER.$content._P_END;
CloseTable();}
}
else if ($d_op=="MostPopular")
{
// List Next Most Popular Downloads
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
if ($cid) { $totalresults = $db->sql_numrows($db->sql_query("select title from $prefix"._downloads_categories." WHERE cid = '$cid'"));
$result = $db->sql_query("select title from $prefix"._downloads_categories." WHERE cid = '$cid' LIMIT $start,$increment");
$row = $db->sql_fetchrow($result);
$category = strtr(strip_tags($row["title"]), $array_correction);
$title = ""._POPULAR." : ".$category.""; Title($title);}
else { $totalresults = $db->sql_numrows($db->sql_query("select title, hits, url from $prefix"._downloads_downloads." order by hits desc"));
$result = $db->sql_query("select title, hits, url from $prefix"._downloads_downloads." order by hits desc LIMIT $start,$increment");
$title = ""._POPULAR.""; Title($title);}
$title = char_dec($title);
OpenTable();
echo $title;
CloseTable();
$row = $db->sql_fetchrow($result);
// Shorten Content
$content = "";
if($row)
{
$c=$start;$c=$c+1;
do {
$title = strtr(strip_tags($row["title"]), $array_correction);
$title = ucfirst ($title);
$title = (strlen($title) > 30) ? (substr ($title,0,30)."..."):($title);
$lid = $row["lid"];
$score = $row["downloadratingsummary"];
$score = explode(".",$score);
$rating = $score[0];
$hits = $row["hits"];
$url = $row["url"];
// Display Brief Download Details
$content .= _B.$c.". ".$title._B_END." (".$hits." "._DOWNLOADS.")"._BR
."<a href=\"w2g_modules.php?name=".$modulename."&d_op=viewdownloaddetails&lid=".$lid."\" title=\""._DETAILS."\">"._DETAILS."</a> | <a href=\"".$url."\" title=\""._DOWNLOADNOW."\">"._DOWNLOADNOW."</a>"._BR;
if ($row["title"]) { $c = $c+1; }
} while ($row = $db->sql_fetchrow($result));
$content = char_dec($content);
OpenTable();
echo _P_CENTER.$content._P_END;
$query = "&d_op=".$d_op."";
if ($cid) { $query .= "&cid=".$cid.""; }
doPageNavigation($start,$increment,$totalresults,$query);
CloseTable();
}
else { $content = ""._NOMATCHES."";
$content = char_dec($content);
OpenTable();
echo _P_CENTER.$content._P_END;
CloseTable();}
}
else if ($d_op=="viewdownload")
{
if ($cid){
// Find Category Name
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$result1 = $db->sql_query("select * from $prefix"._downloads_categories." where cid = '$cid' limit 1");
$row1 = $db->sql_fetchrow($result1);
$title = strtr(strip_tags($row1["title"]), $array_correction);
$content = strtr(strip_tags($row1["cdescription"]), $array_correction);
$title = char_dec($title);
OpenTable();
Title($title);
echo _P_CENTER.$content._P_END;
CloseTable();
// Are there Sub-cats?
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$result2 = $db->sql_query("select * from $prefix"._downloads_categories." where parentid = '$cid' order by title asc");
$row2 = $db->sql_fetchrow($result2);
if ($row2)
{
$content = "";
do {
$subcat_title = strtr(strip_tags($row2["title"]), $array_correction);
$subcat_desc = strtr(strip_tags($row2["cdescription"]), $array_correction);
$subcat_id = $row2["cid"];
$content .= " <a href=\"w2g_modules.php?name=".$modulename."&d_op=".$d_op."&cid=".$subcat_id."\">";
$content .= "+ ";
$content .= $subcat_title."</a> ";
} while ($row2 = $db->sql_fetchrow($result2));
OpenTable();
$title = ""._USUBCATEGORIES."";
$title = char_dec($title);
$content = char_dec($content);
Title($title);
echo _P_CENTER.$content._P_END;
CloseTable();
}
// Display Most Recent Downloads In CATEGORY
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$totalresults = $db->sql_numrows($db->sql_query("select * from $prefix"._downloads_downloads." WHERE cid = '$cid' ORDER BY date DESC"));
$result = $db->sql_query("select * from $prefix"._downloads_downloads." WHERE cid = '$cid' ORDER BY date DESC LIMIT $start,$increment");
$row = $db->sql_fetchrow($result);
// Shorten Content
if($row)
{
$title = ""._DDATE2."";
$title = char_dec($title);
OpenTable();
echo $title;
CloseTable();
$content = "";
$c=$start;$c=$c+1;
do {
$title = strtr(strip_tags($row["title"]), $array_correction);
$title = ucfirst ($title);
$title = (strlen($title) > 30) ? (substr ($title,0,30)."..."):($title);
$lid = $row["lid"];
$score = $row["downloadratingsummary"];
$score = explode(".",$score);
$rating = $score[0];
$hits = $row["hits"];
$url = $row["url"];
// Display Brief Download Details
$content .= _B.$c.". ".$title._B_END." (".$hits." "._DOWNLOADS.")"._BR
."<a href=\"w2g_modules.php?name=".$modulename."&d_op=viewdownloaddetails&lid=".$lid."\" title=\""._DETAILS."\">"._DETAILS."</a> | <a href=\"".$url."\" title=\""._DOWNLOADNOW."\">"._DOWNLOADNOW."</a>"._BR;
if ($row["title"]) { $c = $c+1; }
} while ($row = $db->sql_fetchrow($result));
$content = char_dec($content);
OpenTable();
echo _P_CENTER.$content._P_END;
$query = "&d_op=".$d_op."";
if ($cid) { $query .= "&cid=".$cid.""; }
doPageNavigation($start,$increment,$totalresults,$query);
CloseTable();
}
else { $content = ""._NOMATCHES."";
$content = char_dec($content);
OpenTable();
echo _P_CENTER.$content._P_END;
CloseTable();}
}
}
else {
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$totalresults = $db->sql_numrows($db->sql_query("select * from $prefix"._downloads_categories." where parentid = '0' order by title asc"));
$result2 = $db->sql_query("select * from $prefix"._downloads_categories." where parentid = '0' order by title asc limit $start,$increment");
$row2 = $db->sql_fetchrow($result2);
if ($row2)
{
$content = "";
do {
$subcat_title = strtr(strip_tags($row2["title"]), $array_correction);
$subcat_desc = strtr(strip_tags($row2["cdescription"]), $array_correction);
$subcat_id = $row2["cid"];
$content .= " <a href=\"w2g_modules.php?name=".$modulename."&d_op=viewdownload&cid=".$subcat_id."\">";
$content .= $subcat_title."</a>"._BR;
} while ($row2 = $db->sql_fetchrow($result2));
OpenTable();
$title = ""._CATEGORIES."";
$title = char_dec($title);
$content = char_dec($content);
Title($title);
echo _P_CENTER.$content._P_END;
$query = "";
doPageNavigation($start,$increment,$totalresults,$query);
OpenTable();
}
}
// Options on ALL Pages
OpenTable();
$title = ""._MENUFOR." ".$modulename."";
$content = _P_CENTER."<a href=\"w2g_modules.php?name=".$moduletitle."\" title=\""._CATEGORIES."\">"._CATEGORIES."</a> | <a href=\"w2g_modules.php?name=".$moduletitle."&d_op=NewDownloads\" title=\""._NEWDOWNLOADS."\">"._NEWDOWNLOADS."</a> | <a href=\"w2g_modules.php?name=".$moduletitle."&d_op=MostPopular\" title=\""._POPULAR."\">"._POPULAR."</a> | <a href=\"w2g_modules.php?name=$moduletitle&d_op=TopRated\" title=\""._TOPRATED."\">"._TOPRATED."</a>"._P_END;
$title = char_dec($title);
$content = char_dec($content);
Title($title);
echo $content;
CloseTable();
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -