コード例 #1
0
}
//a click on the active sorting order link changes the direction
if ($currsort == "posted") {
    $dirpost = changedir($currdir);
}
if ($currsort == "name") {
    $dirname = changedir($currdir);
}
if ($currsort == "message_input") {
    $dirmess = changedir($currdir);
}
if ($currsort == "posting_id") {
    $dirbelo = changedir($currdir);
}
if ($currsort == "audio_length") {
    $dirtime = changedir($currdir);
}
//table which should be coded way more beautiful
echo "<table>\n<tr>\n";
echo "<th><a href=\"index.php" . addToUrl("sort", $dirpost . "posted") . "\">date</a></th>\n";
echo "<th><a href=\"index.php" . addToUrl("sort", $dirname . "name") . "\">name</a></th>\n";
echo "<th><a href=\"index.php" . addToUrl("sort", $dirmess . "message_input") . "\">message</a></th>\n";
echo "<th><a href=\"index.php" . addToUrl("sort", $dirbelo . "posting_id") . "\">belongs to</a></th>\n";
echo "<th>play</th>\n";
echo "<th class=\"size\"><a href=\"index.php" . addToUrl("sort", $dirtime . "audio_length") . "\">time</a></th>\n";
echo "<th></th>\n</tr>\n\n";
//one table-row for each entry in the database
for ($i = 0; $i < $rowcount; $i++) {
    echo "<tr>\n";
    //showing the date/time
    $dateformat = $settings['dateformat'];
コード例 #2
0
ファイル: backend_postings.php プロジェクト: kldeepak/swara
}
//a click on the active sorting order link changes the direction
if ($currsort == "posted") {
    $dirpost = changedir($currdir);
}
if ($currsort == "author_id") {
    $dirauth = changedir($currdir);
}
if ($currsort == "title") {
    $dirtitl = changedir($currdir);
}
if ($currsort == "audio_length") {
    $diraudi = changedir($currdir);
}
if ($currsort == "status") {
    $dirstat = changedir($currdir);
}
//pink print for active sorting type
$pink = array("posted" => "", "author_id" => "", "title" => "", "audio_length" => "", "status" => "");
foreach ($pink as $key => $value) {
    if ($currsort == $key) {
        $pink[$key] = " class=\"pink\"";
    }
}
//generates the links
echo "<th><a" . $pink['posted'] . " href=\"index.php" . addToUrl("sort", $dirpost . "posted") . "\">" . bla("post_date") . "</a></th>\n";
echo "<th><a" . $pink['author_id'] . " href=\"index.php" . addToUrl("sort", $dirauth . "author_id") . "\">" . bla("post_author") . "</a></th>\n";
//echo "<th>".bla("post_sticky")."</th>\n";
echo "<th><a" . $pink['title'] . " href=\"index.php" . addToUrl("sort", $dirtitl . "title") . "\">" . bla("post_title") . "</a></th>\n";
echo "<th>" . bla("post_play") . "</th>\n";
echo "<th><a" . $pink['audio_length'] . " href=\"index.php" . addToUrl("sort", $diraudi . "audio_length") . "\">" . bla("post_length") . "</a></th>\n";
コード例 #3
0
ファイル: backend_stats.php プロジェクト: kldeepak/swara
    $dirpost = changedir($sortdir);
}
if ($sortby == "title") {
    $dirtitle = changedir($sortdir);
}
if ($sortby == "countweb") {
    $dirweb = changedir($sortdir);
}
if ($sortby == "countfla") {
    $dirfla = changedir($sortdir);
}
if ($sortby == "countpod") {
    $dirpod = changedir($sortdir);
}
if ($sortby == "countall") {
    $dirall = changedir($sortdir);
}
//make 0 to 1 and vice versa
function changedir($x)
{
    if ($x == "0") {
        return "1";
    }
    if ($x == "1") {
        return "0";
    }
}
//build the list for choosing time period
$showsel = array("tenpost" => "", "oneweek" => "", "onemonth" => "", "threemonth" => "", "oneyear" => "", "allpost" => "");
if (isset($_GET['show'])) {
    foreach ($showsel as $show => $value) {