Ejemplo n.º 1
0
    </head>
    <body>
          <?php 
require_once 'header.php';
?>
        <?php 
#echo  $rand = md5(substr(md5(microtime()),rand(0,26),11));
?>
        <?php 
require_once 'include/db_connect.php';
require_once 'include/essential.php';
$user = $_GET['user'];
$receiver = getuser($user, 'fname');
$sender = getuser($pid1, 'fname');
$rava = getavatar($user, 'avatar');
$senava = getavatar($pid1, 'avatar');
?>
        
        
        <link rel="stylesheet" href="css/chat.css">
<div class="container">
    <div class="row">
        <div class="col-md-5">
            <div class="panel panel-primary">
                <div class="panel-heading" id="accordion">
                    <span class="glyphicon glyphicon-comment"></span> Chat
                    <div class="btn-group pull-right">
                        <a type="button" class="btn btn-default btn-xs" data-toggle="collapse" data-parent="#accordion" 
href="#collapseOne">
                            <span class="glyphicon glyphicon-chevron-down"></span>
                        </a>
Ejemplo n.º 2
0
     $email = str_replace('%email%', mail_protect($email), $_language->module['email_link']);
 } else {
     $email = '';
 }
 $gethomepage = gethomepage($ds['userID']);
 if ($gethomepage != "" && $gethomepage != "http://" && $gethomepage != "http:///" && $gethomepage != "n/a") {
     $hp = '<a href="http://' . $gethomepage . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="' . $_language->module['homepage'] . '" /></a>';
 } else {
     $hp = '';
 }
 if (isonline($ds['userID']) == "offline") {
     $statuspic = '<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />';
 } else {
     $statuspic = '<img src="images/icons/online.gif" width="7" height="7" alt="online" />';
 }
 $avatar = '<img src="images/avatars/' . getavatar($ds['userID']) . '" align="left" alt="Avatar" />';
 if ($loggedin && $ds['userID'] != $userID) {
     $pm = '<a href="index.php?site=messenger&amp;action=touser&amp;touser='******'userID'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['send_message'] . '" /></a>';
     if (isignored($userID, $ds['userID'])) {
         $buddy = '<a href="buddys.php?action=readd&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="' . $_language->module['readd_buddy'] . '" /></a>';
     } elseif (isbuddy($userID, $ds['userID'])) {
         $buddy = '<a href="buddys.php?action=ignore&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="' . $_language->module['ignore_user'] . '" /></a>';
     } elseif ($userID == $ds['userID']) {
         $buddy = '';
     } else {
         $buddy = '<a href="buddys.php?action=add&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
     }
 } else {
     $pm = '';
     $buddy = '';
 }
Ejemplo n.º 3
0
        $ava1 = getavatar($row['user_id'], 'avatar');
        $ava = "<img src='{$ava1}' height='30' width='30' class=>";
        $tim = $row['time'];
        $hash = $row['ghash'];
        echo "<div class='post'><div class='panel panel-default'>\n  <div class='panel-heading'>" . $ava . $postn . "</div>\n  <div class='panel-body'>" . $row['message'] . "\n   \n  </div><div class='panel-footer'>Posted at&nbsp;&nbsp" . $tim . "</div>\n</div>\n         </div></div>";
    }
    if ($type == 'image') {
        $postn = getuser($row['user_id'], 'fname');
        $ava1 = getavatar($row['user_id'], 'avatar');
        $ava = "<img src='{$ava1}' height='30' width='30'>";
        $pim = $row['pimage'];
        $pim1 = "<img src='{$pim}' class='img-responsive center-block'>";
        echo "<div class='post'><div class='panel panel-default'>\n  <div class='panel-heading'>" . $ava . $postn . "</div>\n  <div class='panel-body'>" . $row['message'] . $pim1 . "\n   \n  </div>\n         </div></div>";
    }
    if ($type == 'video') {
        $postn = getuser($row['user_id'], 'fname');
        $ava1 = getavatar($row['user_id'], 'avatar');
        $ava = "<img src='{$ava1}' height='30' width='30'>";
        $url = $row['url'];
        $vi = "  <iframe src='{$url}'\n           frameborder='0' width='476' height='400'\n                allowfullscreen ></iframe >";
        echo "<div class='post'><div class='panel panel-default'>\n  <div class='panel-heading'>" . $ava . $postn . "</div>\n  <div class='panel-body'>" . $row['message'] . $vi . "\n   \n  </div>\n         </div></div>";
    }
    if ($type == 'location') {
        $postn = getuser($row['user_id'], 'fname');
        $ava1 = getavatar($row['user_id'], 'avatar');
        $ava = "<img src='{$ava1}' height='30' width='30'>";
        $pla = $row['place'];
        echo "<div class='post'><div class='panel panel-default'>\n  <div class='panel-heading'>" . $ava . $postn . "</div>\n  <div class='panel-body'>" . $row['message'] . "<br>" . $pla . "\n   \n  </div>\n         </div></div>";
    }
}
require_once 'footer.php';
Ejemplo n.º 4
0
<div id="main" class="setting">
<form action="action.php?act=update" method="POST" enctype="multipart/form-data">
	<h2>资料管理</h2>
	<span class="avatar"><img src="<?php 
echo getavatar($email);
?>
"></span>
	<label>昵称:<input type="text" name="nickname" value="<?php 
echo $nickname;
?>
"></label>
	<label>邮箱:<input type="text" name="email" value="<?php 
echo $email;
?>
">(头像使用Gravatar服务,详情见:<a href="http://www.iplaysoft.com/gravatar.html" target="_blank">Gravatar</a>)</label>
	<input type="hidden" name="userid" value="<?php 
echo $userid;
?>
">
	<input id="submit" type="submit" value="更新">
	<h2>模板设置</h2>
	<input type="hidden" name="MAX_FILE_SIZE" value="102400000">
	<label>更换背景:<input type="file" name="background"></label>
	<input id="submit" type="submit" value="更新">
	<h2>Web服务管理</h2>
	<label>虾米 ID:<input type="text" name="xiami" value="<?php 
echo $xiami;
?>
"></label>
	<label>豆瓣账号:<input type="text" name="douban" value="<?php 
echo $douban;
Ejemplo n.º 5
0
 $squad = '' . getsquadname($ds['squad']) . '';
 $opptag = getinput($ds['opptag']);
 $oppteam = getinput($ds['oppteam']);
 $server = getinput($ds['server']);
 $hltv = getinput($ds['hltv']);
 if (!empty($ds['hometeam'])) {
     $array = unserialize($ds['hometeam']);
     $n = 1;
     foreach ($array as $id) {
         if (!empty($id)) {
             if ($n > 1) {
                 $hometeam .= ', <a href="index.php?site=profile&amp;id=' . $id . '">' . getnickname($id) . '</a>';
                 $hometampic .= '<a href="index.php?site=profile&amp;id=' . $id . '"><img src="images/avatars/' . getavatar($id) . '" alt="" style="margin-left:2px" /></a>';
             } else {
                 $hometeam .= '<a href="index.php?site=profile&amp;id=' . $id . '">' . getnickname($id) . '</a>';
                 $hometampic .= '<a href="index.php?site=profile&amp;id=' . $id . '"><img src="images/avatars/' . getavatar($id) . '" alt="" style="margin-left:2px" /></a>';
             }
             $n++;
         }
     }
 }
 if (!empty($ds['screens'])) {
     $screens = explode("|", $ds['screens']);
 }
 if (is_array($screens)) {
     $n = 1;
     foreach ($screens as $screen) {
         if (!empty($screen)) {
             $screenshots .= '<img src="images/clanwar-screens/' . $screen . '" target="_blank">';
             if ($nbr == 2) {
                 $nbr = 1;
Ejemplo n.º 6
0
    $username = '******' . $userID . '">' . strip_tags(getnickname($userID)) . '</a>';
    $myprofile = '<a href="user/' . $userID . '">My profile</a>';
    if (isanyadmin($userID)) {
        $admin = '<a href="admin/admincenter.php" target="_blank">Admin</a>';
    } else {
        $admin = '';
    }
    if (isclanmember($userID) or iscashadmin($userID)) {
        $cashbox = '&#8226; <a href="index.php?site=cash_box">' . $_language->module['cash-box'] . '</a>';
    } else {
        $cashbox = '';
    }
    $anz = getnewmessages($userID);
    if ($anz) {
        $newmessages = ' (<b>' . $anz . '</b>)';
    } else {
        $newmessages = '0';
    }
    if ($getavatar = getavatar($userID)) {
        $l_avatar = '<img src="images/avatars/' . $getavatar . '" alt="Avatar" />';
    } else {
        $l_avatar = $_language->module['n_a'];
    }
    eval("\$logged = \"" . gettemplate("sm_logged") . "\";");
    echo $logged;
} else {
    //set sessiontest variable (checks if session works correctly)
    $_SESSION['ws_sessiontest'] = true;
    eval("\$loginform = \"" . gettemplate("sm_login") . "\";");
    echo $loginform;
}
 $qry1 = mysqli_fetch_array($query1);
 if ($qry1['username'] || $qry1['nickname']) {
     if ($qry1['userpic'] == '') {
     } else {
         $userpic = '<img src="images/userpics/' . getuserpic($ds['poster']) . '" width="90" height="70" />';
     }
 } else {
     $userpic = '<img src="images/userpics/nouserpic.gif" width="90" height="70" class="hidden" />';
 }
 //in $userpic=''; ändern falls keins angezeigt werden soll.
 $query1 = safe_query("SELECT * FROM " . PREFIX . "user");
 $qry1 = mysqli_fetch_array($query1);
 if ($qry1['username'] || $qry1['nickname']) {
     if ($qry1['avatar'] == '') {
     } else {
         $avatar = '<img src="images/avatars/' . getavatar($ds['poster']) . '" width="70" height="70" />';
     }
 } else {
     $avatar = '<img src="images/avatars/noavatar.gif" width="70" height="70" class="hidden" />';
 }
 //in $userpic=''; ändern falls keins angezeigt werden soll.
 if ($ds['rating']) {
     $ratingpic = '<img src="images/ratingpics/rating' . $ds['rating'] . '.png" width="80" height="16" alt="" />';
 } else {
     $ratingpic = '<img src="images/ratingpics/rating0.png" width="80" height="16" alt="" />';
 }
 if ($loggedin) {
     $getnews = safe_query("SELECT news FROM " . PREFIX . "user WHERE userID='{$userID}'");
     $found = false;
     if (mysqli_num_rows($getnews)) {
         $ga = mysqli_fetch_array($getnews);
                <?php 
            if ($vo['checked'] == '0') {
                ?>
<img title="待审核" src="<?php 
                echo $config_siteurl;
                ?>
statics/images/icon/info.png"><?php 
            }
            ?>
</td>
              <td align="left"><?php 
            echo $vo["userid"];
            ?>
</td>
              <td align="left"><img src="<?php 
            echo getavatar($vo['userid']);
            ?>
" height=18 width=18 onerror="this.src='<?php 
            echo $config_siteurl;
            ?>
statics/images/member/nophoto.gif'"><?php 
            echo $vo["username"];
            ?>
<a href="javascript:member_infomation(<?php 
            echo $vo["userid"];
            ?>
, '<?php 
            echo $vo["modelid"];
            ?>
', '')"><img src="<?php 
            echo $config_siteurl;
Ejemplo n.º 9
0
 $date = "today";
 $message = cleartext(stripslashes(str_replace(array('\\r\\n', '\\n'), array("\n", "\n"), $_POST['message'])));
 $message = toggle($message, 'xx');
 $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>';
 $board = (int) $_POST['board'];
 $topicname = stripslashes($_POST['topicname']);
 if (!isset($postID)) {
     $postID = '';
 }
 if (isclanmember($userID)) {
     $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
 } else {
     $member = '';
 }
 if (getavatar($userID)) {
     $avatar = '<img src="images/avatars/' . getavatar($userID) . '" alt="" />';
 } else {
     $avatar = '';
 }
 if (getsignatur($userID)) {
     $signatur = cleartext(getsignatur($userID));
 } else {
     $signatur = '';
 }
 if (getemail($userID) and !getemailhide($userID)) {
     $email = '<a href="mailto:' . mail_protect(getemail($userID)) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
 } else {
     $email = '';
 }
 $pm = '';
 $buddy = '';
Ejemplo n.º 10
0
    $size = in_array($size, array("big", "middle", "small")) ? $size : "middle";
    $uid = sprintf("%09d", abs(intval($uid)));
    $level1 = substr($uid, 0, 3);
    $level2 = substr($uid, 3, 2);
    $level3 = substr($uid, 5, 2);
    return $level1 . "/" . $level2 . "/" . $level3 . "/" . substr($uid, -2) . "_avatar_{$size}.jpg";
}
error_reporting(0);
$uid = isset($_GET["uid"]) ? $_GET["uid"] : 0;
$size = isset($_GET["size"]) ? $_GET["size"] : "";
$random = isset($_GET["random"]) ? $_GET["random"] : "";
$engine = isset($_GET["engine"]) ? strtolower($_GET["engine"]) : "";
if (!in_array($engine, array("local", "sae"))) {
    $engine = "local";
}
$avatar = getavatar($uid, $size);
if ($engine == "local") {
    $path = "./data/avatar/";
    $fileExists = file_exists($path . $avatar);
} else {
    require_once "./system/extensions/enginedriver/sae/SAEFile.php";
    $file = new SAEFile();
    $path = $file->fileName("data/avatar/");
    $fileExists = $file->fileExists($path . $avatar);
}
if ($fileExists) {
    $random = !empty($random) ? rand(1000, 9999) : "";
    $avatarUrl = empty($random) ? $path . $avatar : $path . $avatar . "?random=" . $random;
} else {
    $size = in_array($size, array("big", "middle", "small")) ? $size : "middle";
    $avatarUrl = $path . "noavatar_" . $size . ".png";
Ejemplo n.º 11
0
	font-weight: bold;
	font-size: 13pt;
}
</style>
</head>
<body>
<?php 
$sumares = mysql_query(sprintf("SELECT sum(distance) FROM bieganie WHERE user = '******'", mysql_real_escape_string($user)));
$suma = mysql_fetch_row($sumares);
$suma = $suma[0];
?>

<div style="width: 950px">

<?php 
$avatar = getavatar($user);
?>
    <img src="http://blip.pl/<?php 
print $avatar->url_120;
?>
" border="0"/>

	<h1><a href="/" title="Strona główna">Strona główna</a> / Statystyki użytkownika <?php 
print $user;
?>
</h1>

	<hr />


<?php 
Ejemplo n.º 12
0
                 $comments = str_replace($replace, $vars, $_language->module['no_comment']);
                 break;
             case 1:
                 $comments = str_replace($replace, $vars, $_language->module['comment']);
                 break;
             default:
                 $comments = str_replace($replace, $vars, $_language->module['comments']);
                 break;
         }
     }
 } else {
     $comments = '';
 }
 // END OF COMENTS MOD
 $poster = '<a href="user/' . $ds[poster] . '/">' . getnickname($ds['poster']) . '</a>';
 $avatar = '<img src="images/avatars/' . getavatar($ds['poster']) . '" alt="' . getnickname($ds['poster']) . '" />';
 $related = '';
 if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '" target="_blank">' . $ds['link2'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && !$ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '">' . $ds['link2'] . '</a> ';
 }
 if ($ds['link3'] && $ds['url3'] != "http://" && $ds['window3']) {
     $related .= '&#8226; <a href="' . $ds['url3'] . '" target="_blank">' . $ds['link3'] . '</a> ';
Ejemplo n.º 13
0
     $email = str_replace('%email%', mail_protect($email), $_language->module['email_link']);
 } else {
     $email = '';
 }
 $gethomepage = gethomepage($ds['userID']);
 if ($gethomepage != "" && $gethomepage != "http://" && $gethomepage != "http:///" && $gethomepage != "n/a") {
     $hp = '<a href="http://' . $gethomepage . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="' . $_language->module['homepage'] . '" /></a>';
 } else {
     $hp = '';
 }
 if (isonline($ds['userID']) == "offline") {
     $statuspic = '<img src="images/icons/offline.gif" width="7" height="7" alt="offline" />';
 } else {
     $statuspic = '<img src="images/icons/online.gif" width="7" height="7" alt="online" />';
 }
 $avatar = '<img src="images/avatars/' . getavatar($ds['userID']) . '" align="left" width="90" height="90" alt="Avatar" />';
 if ($loggedin && $ds['userID'] != $userID) {
     $pm = '<a href="index.php?site=messenger&amp;action=touser&amp;touser='******'userID'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['send_message'] . '" /></a>';
     if (isignored($userID, $ds['userID'])) {
         $buddy = '<a href="buddys.php?action=readd&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" width="16" height="16" border="0" alt="' . $_language->module['readd_buddy'] . '" /></a>';
     } elseif (isbuddy($userID, $ds['userID'])) {
         $buddy = '<a href="buddys.php?action=ignore&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" width="16" height="16" border="0" alt="' . $_language->module['ignore_user'] . '" /></a>';
     } elseif ($userID == $ds['userID']) {
         $buddy = '';
     } else {
         $buddy = '<a href="buddys.php?action=add&amp;id=' . $ds['userID'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_add.gif" width="16" height="16" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
     }
 } else {
     $pm = '';
     $buddy = '';
 }
Ejemplo n.º 14
0
function showtopic($topic, $edit, $addreply, $quoteID, $type)
{
    global $userID;
    global $loggedin;
    global $page;
    global $maxposts;
    global $preview;
    global $message;
    global $picsize_l;
    global $_language;
    $_language->read_module('forum');
    $_language->read_module('bbcode', true);
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $thread = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE topicID='{$topic}' ");
    $dt = mysql_fetch_array($thread);
    $usergrp = 0;
    $writer = 0;
    $ismod = ismoderator($userID, $dt['boardID']);
    if ($dt['writegrps'] != "" and !$ismod) {
        $writegrps = explode(";", $dt['writegrps']);
        foreach ($writegrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                $writer = 1;
                break;
            }
        }
    } else {
        $writer = 1;
    }
    if ($dt['readgrps'] != "" and !$usergrp and !$ismod) {
        $readgrps = explode(";", $dt['readgrps']);
        foreach ($readgrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                break;
            }
        }
        if (!$usergrp) {
            echo $_language->module['no_permission'];
            redirect('index.php?site=forum', $_language->module['no_permission'], 2);
            return;
        }
    }
    $gesamt = mysql_num_rows(safe_query("SELECT topicID FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}'"));
    if ($gesamt == 0) {
        die($_language->module['topic_not_found'] . " <a href=\"javascript:history.back()\">back</a>");
    }
    $pages = 1;
    if (!isset($page) || ($site = '')) {
        $page = 1;
    }
    if (isset($type)) {
        if (!($type == 'ASC' || $type == 'DESC')) {
            $type = "ASC";
        }
    } else {
        $type = "ASC";
    }
    $max = $maxposts;
    $pages = ceil($gesamt / $maxposts);
    $page_link = '';
    if ($pages > 1) {
        $page_link = makepagelink("index.php?site=forum_topic&amp;topic={$topic}&amp;type={$type}", $page, $pages);
    }
    if ($type == "ASC") {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=DESC">' . $_language->module['sort'] . ':</a> <img src="images/icons/asc.gif" alt="" />';
    } else {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=ASC">' . $_language->module['sort'] . ':</a> <img src="images/icons/desc.gif" alt="" />';
    }
    $start = 0;
    if ($page > 1) {
        $start = $page * $max - $max;
    }
    safe_query("UPDATE " . PREFIX . "forum_topics SET views=views+1 WHERE topicID='{$topic}' ");
    // viewed topics
    if (mysql_num_rows(safe_query("SELECT userID FROM " . PREFIX . "user WHERE topics LIKE '%|" . $topic . "|%'"))) {
        $gv = mysql_fetch_array(safe_query("SELECT topics FROM " . PREFIX . "user WHERE userID='{$userID}'"));
        $array = explode("|", $gv['topics']);
        $new = '|';
        foreach ($array as $split) {
            if ($split != "" and $split != $topic) {
                $new = $new . $split . '|';
            }
        }
        safe_query("UPDATE " . PREFIX . "user SET topics='" . $new . "' WHERE userID='{$userID}'");
    }
    // end viewed topics
    $topicname = getinput($dt['topic']);
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='" . $dt['boardID'] . "' ");
    $db = mysql_fetch_array($ergebnis);
    $boardname = $db['name'];
    $moderators = getmoderators($dt['boardID']);
    $topicactions = '<a href="printview.php?board=' . $dt['boardID'] . '&amp;topic=' . $topic . '" target="_blank"><img src="images/icons/printview.gif" border="0" alt="printview" /></a> ';
    if ($loggedin and $writer) {
        $topicactions .= '<a href="index.php?site=forum&amp;addtopic=true&amp;action=newtopic&amp;board=' . $dt['boardID'] . '">' . $_language->module['newtopic_image'] . '</a> <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;addreply=true&amp;page=' . $pages . '&amp;type=' . $type . '">' . $_language->module['newreply_image'] . '</a>';
    }
    if ($dt['closed']) {
        $closed = $_language->module['closed_image'];
    } else {
        $closed = '';
    }
    $posttype = 'topic';
    $kathname = getcategoryname($db['category']);
    eval("\$forum_topics_title = \"" . gettemplate("forum_topics_title") . "\";");
    echo $forum_topics_title;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    if ($dt['closed']) {
        echo '<br /><br />' . $_language->module['closed_image'] . '<br /><br />';
    }
    if ($edit && !$dt['closed']) {
        $id = $_GET['id'];
        $dr = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE postID='" . $id . "'"));
        $topic = $_GET['topic'];
        $bg1 = BG_1;
        $_sticky = $dt['sticky'] == '1' ? 'checked="checked"' : '';
        $anz = mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='" . $dt['topicID'] . "' AND postID='" . $id . "' AND poster='" . $userID . "' ORDER BY date ASC LIMIT 0,1"));
        if ($anz or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            if (istopicpost($dt['topicID'], $id)) {
                $bg1 = BG_1;
                // topicmessage
                $message = getinput($dr['message']);
                $post = $id;
                $board = $dt['boardID'];
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'] . '<br />';
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'] . '<br />';
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                // topic icon list
                $iconlist = '<tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="ausrufezeichen.gif" />
          <img src="images/icons/topicicons/ausrufezeichen.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="biggrin.gif" />
          <img src="images/icons/topicicons/biggrin.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="boese.gif" />
          <img src="images/icons/topicicons/boese.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="bored.gif" />
          <img src="images/icons/topicicons/bored.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="cool.gif" />
          <img src="images/icons/topicicons/cool.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="eek.gif" />
          <img src="images/icons/topicicons/eek.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frage.gif" />
          <img src="images/icons/topicicons/frage.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frown.gif" />
          <img src="images/icons/topicicons/frown.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="lampe.gif" />
          <img src="images/icons/topicicons/lampe.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="mad.gif" />
          <img src="images/icons/topicicons/mad.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="pfeil.gif" />
          <img src="images/icons/topicicons/pfeil.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="smile.gif" />
          <img src="images/icons/topicicons/smile.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="text.gif" />
          <img src="images/icons/topicicons/text.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_down.gif" />
          <img src="images/icons/topicicons/thumb_down.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_up.gif" />
          <img src="images/icons/topicicons/thumb_up.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="wink.gif" />
          <img src="images/icons/topicicons/wink.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
            <td colspan="4"><input type="radio" class="input" name="icon" value="0" /> ' . $_language->module['no_icon'] . '</td>
          </tr>';
                if ($dt['icon']) {
                    $iconlist = str_replace('value="' . $dt['icon'] . '"', 'value="' . $dt['icon'] . '" checked="checked"', $iconlist);
                } else {
                    $iconlist = str_replace('value="0"', 'value="0" checked="checked"', $iconlist);
                }
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_edittopic = \"" . gettemplate("forum_edittopic") . "\";");
                echo $forum_edittopic;
            } else {
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'];
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'];
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $dr['message'] = getinput($dr['message']);
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_editpost = \"" . gettemplate("forum_editpost") . "\";");
                echo $forum_editpost;
            }
        } else {
            echo $_language->module['permission_denied'] . '<br /><br />';
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT {$start}, {$max}");
    } elseif ($addreply && !$dt['closed']) {
        if ($loggedin and $writer) {
            if (isset($_POST['preview'])) {
                $bg1 = BG_1;
                $bg2 = BG_2;
                $time = date("H:i", time());
                $date = $_language->module['today'];
                $message_preview = getforminput($_POST['message']);
                $postID = 0;
                $message = cleartext(getforminput($_POST['message']));
                $message = toggle($message, 'xx');
                $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>';
                if (isclanmember($userID)) {
                    $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
                } else {
                    $member = '';
                }
                if ($getavatar = getavatar($userID)) {
                    $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
                } else {
                    $avatar = '';
                }
                if ($getsignatur = getsignatur($userID)) {
                    $signatur = cleartext($getsignatur);
                } else {
                    $signatur = '';
                }
                if ($getemail = getemail($userID) and !getemailhide($userID)) {
                    $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
                } else {
                    $email = '';
                }
                if (isset($_POST['notify'])) {
                    $notify = 'checked="checked"';
                } else {
                    $notify = '';
                }
                $pm = '';
                $buddy = '';
                $statuspic = '<img src="images/icons/online.gif" alt="online" />';
                if (!validate_url(gethomepage($userID))) {
                    $hp = '';
                } else {
                    $hp = '<a href="' . gethomepage($userID) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
                }
                $registered = getregistered($userID);
                $posts = getuserforumposts($userID);
                if (isset($_POST['sticky'])) {
                    $post_sticky = $_POST['sticky'];
                } else {
                    $post_sticky = null;
                }
                $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
                if (isforumadmin($userID)) {
                    $usertype = $_language->module['admin'];
                    $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
                } elseif (isanymoderator($userID)) {
                    $usertype = $_language->module['moderator'];
                    $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
                } else {
                    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0");
                    $ds = mysql_fetch_array($ergebnis);
                    $usertype = $ds['rank'];
                    $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
                }
                if (isforumadmin($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } elseif (isanymoderator($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $quote = "";
                $actions = "";
                echo '<table width="100%" cellspacing="1" cellpadding="2" bgcolor="' . BORDER . '">
          <tr bgcolor="' . BGHEAD . '">
            <td colspan="2" class="title" align="center">' . $_language->module['preview'] . '</td>
          </tr>
          <tr bgcolor="' . PAGEBG . '"><td colspan="2"></td></tr>';
                eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
                echo $forum_topic_content;
                echo '</table>';
                $message = $message_preview;
            } else {
                if ($quoteID) {
                    $ergebnis = safe_query("SELECT poster,message FROM " . PREFIX . "forum_posts WHERE postID='{$quoteID}'");
                    $ds = mysql_fetch_array($ergebnis);
                    $message = '[quote=' . getnickname($ds['poster']) . ']' . getinput($ds['message']) . '[/quote]';
                }
            }
            if (isset($_POST['sticky'])) {
                $post_sticky = $_POST['sticky'];
            } else {
                $post_sticky = null;
            }
            $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
            if (isforumadmin($userID) || ismoderator($userID, $dt['boardID'])) {
                $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
            } else {
                $chk_sticky = '';
            }
            if (isset($_POST['notify'])) {
                $post_notify = $_POST['notify'];
            } else {
                $post_notify = null;
            }
            $mysql_notify = mysql_num_rows(safe_query("SELECT notifyID FROM " . PREFIX . "forum_notify WHERE userID='" . $userID . "' AND topicID='" . $topic . "'"));
            $notify = $mysql_notify || $post_notify == '1' ? 'checked="checked"' : '';
            $bg1 = BG_1;
            $board = $dt['boardID'];
            eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
            eval("\$forum_newreply = \"" . gettemplate("forum_newreply") . "\";");
            echo $forum_newreply;
        } elseif ($loggedin) {
            echo '<br /><br />' . $_language->module['no_access_write'] . '<br /><br />';
        } else {
            echo $_language->module['not_logged_msg'];
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT 0, " . $max . "");
    } else {
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date {$type} LIMIT " . $start . ", " . $max . "");
    }
    eval("\$forum_topic_head = \"" . gettemplate("forum_topic_head") . "\";");
    echo $forum_topic_head;
    $i = 1;
    while ($dr = mysql_fetch_array($replys)) {
        if ($i % 2) {
            $bg1 = BG_1;
            $bg2 = BG_2;
        } else {
            $bg1 = BG_3;
            $bg2 = BG_4;
        }
        $date = date("d.m.Y", $dr['date']);
        $time = date("H:i", $dr['date']);
        $today = date("d.m.Y", time());
        $yesterday = date("d.m.Y", time() - 3600 * 24);
        if ($date == $today) {
            $date = $_language->module['today'];
        } elseif ($date == $yesterday && $date < $today) {
            $date = $_language->module['yesterday'];
        } else {
            $date = $date;
        }
        $message = cleartext($dr['message']);
        $message = toggle($message, $dr['postID']);
        $postID = $dr['postID'];
        $username = '******' . $dr['poster'] . '"><b>' . stripslashes(getnickname($dr['poster'])) . '</b></a>';
        if (isclanmember($dr['poster'])) {
            $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
        } else {
            $member = '';
        }
        if ($getavatar = getavatar($dr['poster'])) {
            $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
        } else {
            $avatar = '';
        }
        if ($getsignatur = getsignatur($dr['poster'])) {
            $signatur = cleartext($getsignatur);
        } else {
            $signatur = '';
        }
        if ($getemail = getemail($dr['poster']) and !getemailhide($dr['poster'])) {
            $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
        } else {
            $email = '';
        }
        $pm = '';
        $buddy = '';
        if ($loggedin && $dr['poster'] != $userID) {
            $pm = '<a href="index.php?site=messenger&amp;action=touser&amp;touser='******'poster'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['messenger'] . '" /></a>';
            if (isignored($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=readd&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" border="0" alt="' . $_language->module['back_buddy'] . '" /></a>';
            } elseif (isbuddy($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=ignore&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="' . $_language->module['ignore'] . '" /></a>';
            } else {
                $buddy = '<a href="buddys.php?action=add&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_add.gif" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
            }
        }
        if (isonline($dr['poster']) == "offline") {
            $statuspic = '<img src="images/icons/offline.gif" alt="offline" />';
        } else {
            $statuspic = '<img src="images/icons/online.gif" alt="online" />';
        }
        if (!validate_url(gethomepage($dr['poster']))) {
            $hp = '';
        } else {
            $hp = '<a href="' . gethomepage($dr['poster']) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
        }
        if (!$dt['closed']) {
            $quote = '<a href="index.php?site=forum_topic&amp;addreply=true&amp;board=' . $dt['boardID'] . '&amp;topic=' . $topic . '&amp;quoteID=' . $dr['postID'] . '&amp;page=' . $page . '&amp;type=' . $type . '"><img src="images/icons/quote.gif" border="0" alt="' . $_language->module['quote'] . '" /></a>';
        } else {
            $quote = "";
        }
        $registered = getregistered($dr['poster']);
        $posts = getuserforumposts($dr['poster']);
        if (isforumadmin($dr['poster'])) {
            $usertype = $_language->module['admin'];
            $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
        } elseif (isanymoderator($dr['poster'])) {
            $usertype = $_language->module['moderator'];
            $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
        } else {
            $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0");
            $ds = mysql_fetch_array($ergebnis);
            $usertype = $ds['rank'];
            $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
        }
        $actions = '';
        if (($userID == $dr['poster'] or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) && !$dt['closed']) {
            $actions = ' <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;edit=true&amp;id=' . $dr['postID'] . '&amp;page=' . $page . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit'] . '" /></a> ';
        }
        if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            $actions .= '<input class="input" type="checkbox" name="postID[]" value="' . $dr['postID'] . '" />';
        }
        eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
        echo $forum_topic_content;
        unset($actions);
        $i++;
    }
    $adminactions = "";
    if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
        if ($dt['closed']) {
            $close = '<option value="opentopic">- ' . $_language->module['reopen_topic'] . '</option>';
        } else {
            $close = '<option value="closetopic">- ' . $_language->module['close_topic'] . '</option>';
        }
        $adminactions = '<input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> ' . $_language->module['select_all'] . '
		<select name="admaction">
      <option value="0">' . $_language->module['admin_actions'] . ':</option>
      <option value="delposts">- ' . $_language->module['delete_posts'] . '</option>
      <option value="stickytopic">- ' . $_language->module['make_topic_sticky'] . '</option>
      <option value="unstickytopic">- ' . $_language->module['make_topic_unsticky'] . '</option>
      <option value="movetopic">- ' . $_language->module['move_topic'] . '</option>
      ' . $close . '
      <option value="deletetopic">- ' . $_language->module['delete_topic'] . '</option>
    </select>
    <input type="hidden" name="topicID" value="' . $topic . '" />
    <input type="hidden" name="board" value="' . $dt['boardID'] . '" />
    <input type="submit" name="submit" value="' . $_language->module['go'] . '" />';
    }
    eval("\$forum_topic_foot = \"" . gettemplate("forum_topic_foot") . "\";");
    echo $forum_topic_foot;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    echo '<div align="right">' . $adminactions . '</div></form>';
    if ($dt['closed']) {
        echo $_language->module['closed_image'];
    } else {
        if (!$loggedin && !$edit) {
            echo $_language->module['not_logged_msg'];
        }
    }
}
Ejemplo n.º 15
0
<?php

$position = getuserposition($_SESSION[username]);
$avatar = getavatar($_SESSION[username]);
?>
<header class="header">
            <a href="../main/index.php" class="logo">
                <!-- Add the class icon to your logo image or logo icon to add the margining -->
                <div class='animated zoomIn'>GIS for JHCIS</div>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                    <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                   		<span class="sr-only">Toggle navigation</span>
                    	<span class="icon-bar"></span>
                    	<span class="icon-bar"></span>
                    	<span class="icon-bar"></span>
                	</a>               
                <div class="navbar-right">
                    <ul class="nav navbar-nav">
                        <!-- Messages: style can be found in dropdown.less-->

                        <li class="dropdown messages-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-list-alt"></i>
                                <span class="label label-success">5</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">เมนูใหม่</li>
                                <li>
Ejemplo n.º 16
0
<?php

$user = $_SESSION[user_id];
$sql = "SELECT * FROM `user` where `user`.username = '******'";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$mtitle = $row['prename'];
$mpassword = $row['password'];
$mtitlename = getTitle($row['prename']);
$mfname = $row['fname'];
$mlname = $row['lname'];
$mname = $row['username'];
$mavatar = getavatar($row['username']);
$musername = getusername($row['username']);
$midcard = $row['idcard'];
$hospname = gethospname($row['pcucode']);
$mposition = getuserposition($row['username']);
?>
<section class="content-header">
	<h1>
	ข้อมูลส่วนตัว
   	</h1>
		<ol class="breadcrumb">
			<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
			<li class="active">profile</li>
		</ol>
</section>
<section class="content">
	<div class="row">
		<div class="col-md-12">
			<!-- Primary box -->