예제 #1
1
    begin_table();
    $res = SQL_Query_exec("SELECT COUNT(*), COUNT(`unread` = 'yes') FROM messages WHERE `receiver` = {$CURUSER['id']} AND `location` IN ('in','both')");
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND `location` IN ('in','both')");
    $inbox = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `receiver` = " . $CURUSER["id"] . " AND `location` IN ('in','both') AND `unread` = 'yes'");
    $unread = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` IN ('out','both')");
    $outbox = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'draft'");
    $draft = mysql_result($res, 0);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'template'");
    $template = mysql_result($res, 0);
    tr2('<a href="mailbox.php?inbox">' . T_("INBOX") . ' </a> ', " {$inbox} " . P_("message", $inbox) . " ({$unread} " . T_("unread") . ")");
    tr2('<a href="mailbox.php?outbox">' . T_("OUTBOX") . ' </a> ', " {$outbox} " . P_("message", $outbox));
    tr2('<a href="mailbox.php?draft">' . T_("DRAFT") . ' </a> ', " {$draft} " . P_("message", $draft));
    tr2('<a href="mailbox.php?templates">' . T_("TEMPLATES") . ' </a> ', " {$template} " . P_("message", $template));
    end_table();
    echo "<br /><br />";
} elseif ($type == "Mail") {
    $order = order("added,sender,sendto,subject", "added", true);
    $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE {$where}");
    $count = mysql_result($res, 0);
    list($pagertop, $pagerbottom, $limit) = pager2(20, $count);
    print $pagertop;
    begin_form();
    begin_table(0, "list");
    $table['&nbsp;'] = th("<input type=\"checkbox\" onclick=\"toggleChecked(this.checked);this.form.remove.disabled=true;\" />", 1);
    $table['Sender'] = th_left("Sender", 'sender');
    $table['Sent_to'] = th_left("Sent To", 'receiver');
    $table['Subject'] = th_left("Subject", 'subject');
    $table['Date'] = th_left("Date", 'added');
예제 #2
0
}
if ($sDateTo != "") {
    $sDateCondition .= " and date < '" . $sDateTo . "' ";
}
if ($sNameOfStat == "NumberOfFinds") {
    $sTypeCondition = " and  cl.type=1 ";
}
if ($sNameOfStat == "MaintenanceOfCaches") {
    $sTypeCondition = " and  cl.type=6 ";
}
$asUserID = explode(",", $sUserIDLine);
if (!strlen($sUserIDLine)) {
    $sEND = tr2('SelectUsers', $lang);
}
if (count($asUserID) > 30) {
    $sEND = tr2('more30', $lang);
}
if ($sEND != "") {
    echo "<script type='text/javascript'>";
    echo "alert( '{$sEND}' );";
    //$asUserID = explode(",", "");
    echo "</script>";
}
if ($sEND != "") {
    echo "<script type='text/javascript'>";
    echo "return;";
    echo "</script>";
}
$sCondition = "";
foreach ($asUserID as $sID) {
    if (strlen($sCondition)) {
예제 #3
0
    $aUserName[$sID] = $record['username'];
}
unset($dbc);
////////////////////
echo "<script type='text/javascript'>";
$i = 0;
foreach ($asUserID as $sID) {
    $sName = $aUserName[$sID];
    $sName = str_replace("'", "`", $sName);
    echo "gcl.addColumn('number', '{$sName}');";
    $aNrColumn[$sID] = $i;
    $i++;
}
//echo "gcl.addChartOption('vAxis', { title: 'Ilość keszy' } );";
echo " var chartOpt = gcl.getChartOption();";
echo " chartOpt.vAxis.title= '" . tr2('NrCaches', $lang) . "';";
echo "</script>";
////////////////////////////
$dbc = new dataBase();
$query = "SELECT year( cl.date) year, month( cl.date ) month, day( cl.date ) day,\n         u.username username, u.user_id user_id,\n        COUNT(*) count\n\n        FROM\n        cache_logs cl\n        join caches c on c.cache_id = cl.cache_id\n        join user u on cl.user_id = u.user_id\n\n        WHERE cl.deleted=0 " . $sTypeCondition . $sCondition . "GROUP BY year, month, day, user_id\n        order by year, month, day   ";
$dbc->multiVariableQuery($query);
$nCount = array();
foreach ($asUserID as $sID) {
    $anCount[$sID] = 0;
}
echo "<script type='text/javascript'>";
while ($record = $dbc->dbResultFetch()) {
    $nYear = $record['year'];
    $nMonth = $record['month'] - 1;
    $nDay = $record['day'];
    $sNewDate = "new Date( {$nYear}, {$nMonth}, {$nDay} )";
 private function makePtContent($newPt, $langTr, $dynstylepath, $regions)
 {
     $fileContent = '<span style="display:none" id="ptPromoId">xxkgfj8ipzxx' . $newPt['id'] . 'xxkgfj8ipzxx</span>';
     $fileContent .= '<table width="100%"><tr><td style="padding-left: 10px;padding-right: 10px;">';
     if ($newPt['image'] != '') {
         $fileContent .= '<img height="50" src="' . $newPt['image'] . '" />';
     } else {
         $fileContent .= '<img height="50" src="tpl/stdstyle/images/blue/powerTrailGenericLogo.png" />';
     }
     $fileContent .= '</td><td width=50% style="font-size: 13px; padding-left: 10px; padding-right: 10px;" valign="center"><a href="powerTrail.php?ptAction=showSerie&ptrail=' . $newPt['id'] . '">' . $newPt['name'] . '</a>';
     $fileContent .= '<td style="font-size: 13px;" valign="center"><b>' . $newPt['cacheCount'] . '</b>&nbsp;' . tr2('pt138', $langTr) . ', <b>' . round($newPt['points'], 2) . '</b>&nbsp;' . tr2('pt038', $langTr) . '</td>';
     if ($regions) {
         $fileContent .= '</td><td style="font-size: 12px;" valign="center">' . tr2($regions['code1'], $langTr) . '>' . $regions['adm3'];
     }
     $fileContent .= '</td></tr></table>';
     file_put_contents($dynstylepath . 'ptPromo.inc-' . $langTr . '.php', $fileContent);
     // print "$langTr <br/> $fileContent";
 }
예제 #5
0
function search_control_set($control_set, $value)
{
    $url = INDEX . get_session('contr');
    return '' . NL . '<div id="form_search">' . NL . '<form action="' . $url . '" method="post" class=standard>' . NL . '<table>' . tr2('Control Set:', select_control_set('control_set', $control_set, 'onChange="submit()"')) . tr2('<span class=fs110>' . translate('Search for:') . '</span>', '<input type="text" id="search" name="search" value="' . $value . '" size="50" onChange="submit()" />') . NL . '</table>' . NL . '</form>' . NL . '</div>' . NL . '<div class=clear></div>';
}
function ratings($score, $votes)
{
    $language = $_POST['lang'];
    if ($votes < 3) {
        return '<span style="color: gray">' . tr2('pt083', $language) . '</span>';
    }
    $scoreNum = score2ratingnum($score);
    switch ($scoreNum) {
        case 0:
            return '<span style="color: #790000">' . tr2('pt074', $language) . '</span>';
        case 1:
            return '<span style="color: #BF3C3C">' . tr2('pt073', $language) . '</span>';
        case 2:
            return '<span style="color: #B36200">' . tr2('pt072', $language) . '</span>';
        case 3:
            return '<span style="color: #518C00">' . tr2('pt071', $language) . '</span>';
        case 4:
            return '<span style="color: #009D00">' . tr2('pt070', $language) . '</span>';
    }
}
예제 #7
0
            echo "<br><table width=60% cellspacing=0 cellpadding=3>";
            tr2('align=center colspan=2 class=colhead', 'Place bet');
            tr2('align=center', '<b>Amount to bet</b>', 'align=center', '<form name=p2p method=post action=' . $phpself . '><input type=text name=amnt size=20 value=1>
<select name=unit>
<option value=1>MB</option>
<option value=2>GB</option>
</select>');
            tr2('align=center colspan=2', '<input type=submit value=Gamble!>');
            echo "</table></form>";
        }
    } else {
        echo "<br>You already have " . safeChar($maxusrbet) . " open bets, wait until they are completed before you start another.<br>";
    }
    // Open Bets table
    echo "<table width=90% cellspacing=0 cellpadding=3><br>";
    tr2('align=center class=colhead colspan=4', 'Open Bets');
    echo "<tr>";
    echo "<td align=center width=15%><b>Name</b></td><td width=15% align=center><b>Amount</b></td>";
    echo "<td width=45% align=center><b>Time</b></td><td align=center><b>Take Bet</b></td>";
    echo "</tr>";
    while ($res = mysql_fetch_assoc($loca)) {
        echo " <tr>";
        echo "<td align=center>{$res['proposed']}</td>";
        echo "<td align=center>" . safeChar(prefixed($res['amount'])) . "</td>";
        echo "<td align=center>{$res['time']}</td>";
        echo "<td align=center><b><a href=" . $casino . "?takebet={$res['id']}>this</a></b></td>";
        echo "</tr>";
        $abcdefgh = 1;
    }
    if ($abcdefgh == false) {
        echo "<tr><td align=center colspan=4>Sorry no Bets</td></tr>";