コード例 #1
0
ファイル: index.php プロジェクト: BackupTheBerlios/fakt
 /* category,   forum, manager, new messages  */
 while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
     $forum = $line['forum'];
     $category = $line['category'];
     $forum_title = $line['forum_title'];
     $manager = $line['manager'];
     $members = $line['members'];
     if (!empty($members) && $name != 'admin') {
         continue;
     }
     print "<TR>\n";
     print "<TD>{$category}\n";
     print "<TD><A HREF={$mainfile}?forum={$forum}&name={$name}&data={$data}>{$forum_title}</A>\n";
     $alias = GetAlias($manager);
     print "<TD>{$alias}\n";
     $new = GetNewMessages($forum);
     print "<TD>{$new}\n";
 }
 print "</TABLE>\n";
 print "</CENTER>\n";
 if (empty($name)) {
     print "<BR><BR><P dir=RTL>\n";
     print "<A HREF={$loginscript}?forum={$table}&url={$mainfile}>{$l10nstr['10']}</A><BR>\n";
     /* system registration */
     print "<BR>{$l10nstr['11']}\n";
     /* must register to system in order to write messages */
     print "{$l10nstr['12']}\n";
     /* reading is possible without registering */
 } else {
     print "<BR><BR><P dir=RTL>\n";
     ShowUserSex();
コード例 #2
0
ファイル: soap.php プロジェクト: kapai69/fl-ru-damp
    public function GetAllInfo($session, $lastprj, $get, $filter, $lastmes)
    {
        $DB = new DB('master');
        $id = array();
        $login = array();
        $uname = array();
        $usurname = array();
        $text = array();
        $picname = array();
        $thread = array();
        $pro = array();
        $online = array();
        $time = array();
        $head = array();
        $budget = array();
        $b_type = array();
        $type = array();
        $role = array();
        if ($sess_ar = Session($session, $error)) {
            $mescount = 0;
            $money = 0;
            $log = fopen('sql.log', 'a');
            $res = $DB->query('select users.hits, users.rating + 0.5*(CURRENT_DATE-reg_date) + freelancer.portf_rating as rating, account.sum from users 
LEFT JOIN account ON account.uid=users.uid LEFT JOIN freelancer ON freelancer.fid=users.uid  where users.uid=? LIMIT 1', $sess_ar['uid']);
            //fwrite($log,"\n".date("Y.m.d h:i:s")." ".join(" ",$filter));
            list($hits, $rating, $money) = @pg_fetch_row($res);
            if ($get[0]) {
                $result_mess = GetNewMessages($sess_ar['uid'], $id, $login, $uname, $usurname, $text, $picname, $thread, $pro, $online, $time, $head, $budget, $b_type, $type, $role, $lastmes);
            }
            if ($get[1]) {
                $result_prj = GetNewProjects($sess_ar['uid'], $filter, $id, $login, $uname, $usurname, $text, $picname, $thread, $pro, $online, $time, $head, $budget, $b_type, $type, $role, $lastprj);
            }
            return array('result' => '', 'id' => $id, 'login' => $login, 'uname' => $uname, 'usurname' => $usurname, 'text' => $text, 'picname' => $picname, 'thread' => $thread, 'pro' => $pro, 'online' => $online, 'time' => $time, 'head' => $head, 'budget' => $budget, 'b_type' => $b_type, 'money' => $money, 'lastprj' => $lastprj, 'rating' => round($rating * 10), 'hits' => $hits, 'type' => $type, 'role' => $role, 'lastmes' => $lastmes);
        } else {
            return array('result' => mb_convert_encoding('Ошибка: ' . $error, 'UTF-8', 'windows-1251'), 'id' => $id, 'login' => $login, 'uname' => $uname, 'usurname' => $usurname, 'text' => $text, 'picname' => $picname, 'thread' => $thread, 'pro' => $pro, 'online' => $online, 'time' => $time, 'head' => $head, 'budget' => $budget, 'b_type' => $b_type, 'money' => 0, 'lastprj' => 0, 'rating' => 0, 'hits' => 0, 'type' => $type, 'role' => $role, 'lastmes' => $lastmes);
        }
    }