$comments = unserialize($share['comments']); $comment_num = $settings['ui_pin']['pin_commentnum']; $comments = $comments ? array_slice($comments, 0, $comment_num) : null; ?> <?php foreach ($comments as $comment) { ?> <div class="comment"> <div class="shareface"><a class="trans07" href="<?php echo spUrl('pub', 'index', array('uid' => $comment['user_id'])); ?> " data-user-id="<?php echo $comment['user_id']; ?> " data-user-profile="1"><img src="<?php echo useravatar($comment['user_id'], 'middle'); ?> " class="avatar" width="30" height="30"></a></div> <div class="shareinfo"><a href="<?php echo spUrl('pub', 'index', array('uid' => $comment['user_id'])); ?> " data-user-id="<?php echo $comment['user_id']; ?> " data-user-profile="1"><?php echo $comment['nickname']; ?> </a><p><?php echo parse_message(sysSubStr($comment['comment_txt'], 50, true)); ?> </p></div>
} ?> </ul> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading">Najnovšie témy (nezamknuté)</div> <ul class="list-group"> <?php $result = dbquery("SELECT * FROM bg_forumtopic WHERE forumt_locked='0' ORDER BY forumt_time DESC LIMIT 0,8"); $rows1 = dbrows($result); if ($rows1 >= "1") { while ($data = dbarray($result)) { echo '<li class="list-group-item"> ' . (useravatar($data["forumt_userid"]) != "/file/avatars/avatar.png" ? '<img src="' . useravatar($data["forumt_userid"]) . '" alt="" class="img-circle pull-left" style="width:20px;margin-right:5px">' : '<img src="' . useravatar($data["forumt_userid"]) . '" alt="" class="img-circle pull-left" style="width:20px;margin-right:5px">') . ' <span class="badge">' . timeago($data["forumt_newpost"]) . '</span> <a href="/tema/' . $data["forumt_id"] . '/' . bezd($data["forumt_name"]) . '" title="' . $data["forumt_name"] . '">' . $data["forumt_name"] . '</a> </li>'; } } else { echo "Žiadne témy."; } ?> </ul> </div> <?php require "inc/footer.php";
<ul> <li><a href="javascript:void(0);" data-action="openRegisterDialog"><?php echo T('join'); ?> </a><b></b></li> </ul> </li> <?php } else { ?> <li class="profile menu"> <a href="<?php echo spUrl("my", "shares"); ?> " class="parent"><img src="<?php echo useravatar($current_user['user_id'], 'middle'); ?> " onerror="javascript:this.src = base_url + '/assets/img/avatar_middle.jpg';"/></a> <ul> <li><a href="javascript:void(0);"><?php echo $current_user['nickname']; ?> </a><b></b></li> <li><a href="<?php echo spUrl("my", "shares"); ?> "><?php echo T('my_home'); ?> </a></li> <li><a href="javascript:void(0);" data-action="openAvatar"><?php
$ftopics = ''; if (_rows($qryft) >= 1) { while ($getft = _fetch($qryft)) { if (fintern($getft['kid'])) { $lp = cnt($db['f_posts'], " WHERE sid = '" . $getft['id'] . "'"); $pagenr = ceil($lp / config('m_ftopics')); $page = $pagenr == 0 ? 1 : $pagenr; $getp = db("SELECT text FROM " . $db['f_posts'] . "\n WHERE kid = '" . $getft['kid'] . "'\n AND sid = '" . $getft['id'] . "'\n ORDER BY date DESC\n LIMIT 1", false, true); $text = strip_tags(!empty($getp) ? $getp['text'] : $getft['t_text']); $intern = $getft['intern'] != 1 ? "" : '<span class="fontWichtig">' . _internal . ':</span>'; $wichtig = $getft['sticky'] != 1 ? '' : '<span class="fontWichtig">' . _sticky . ':</span> '; $ftopics .= show($dir . "/userlobby_forum", array("id" => $getft['id'], "pagenr" => $page, "p" => $lp + 1, "intern" => $intern, "wichtig" => $wichtig, "lpost" => cut(re($text), 100), "kat" => re($getft['kattopic']), "titel" => re($getft['topic']), "kid" => $getft['kid'])); } } } // Userlevel if (($lvl = data("level")) == 1) { $mylevel = _status_user; } elseif ($lvl == 2) { $mylevel = _status_trial; } elseif ($lvl == 3) { $mylevel = _status_member; } elseif ($lvl == 4) { $mylevel = _status_admin; } $erase = $can_erase ? _user_new_erase : ''; $index = show($dir . "/userlobby", array("userlobbyhead" => _userlobby, "erase" => $erase, "pic" => useravatar(), "mynick" => autor($userid), "myrank" => getrank($userid), "myposts" => userstats("forumposts"), "mylogins" => userstats("logins"), "myhits" => userstats("hits"), "mymsg" => $mymsg, "mylevel" => $mylevel, "puser" => _user, "plevel" => _admin_user_level, "plogins" => _profil_logins, "phits" => _profil_pagehits, "prank" => _profil_position, "pposts" => _profil_forenposts, "nkal" => _kalender, "kal" => $nextkal, "nart" => _artikel, "art" => $artikel, "nartc" => _lobby_artikelc, "artc" => $artc, "board" => _forum, "threads" => _forum_thread, "rankings" => $rankings, "nrankings" => _lobby_rankings, "awards" => $awards, "nawards" => _lobby_awards, "nforum" => _lobby_forum, "ftopics" => $ftopics, "lastforum" => _last_forum, "forum" => $forumposts, "nvotes" => _lobby_votes, "ncwcom" => _cw_comments_head, "cwcom" => $cwcom, "ngal" => _lobby_gallery, "gal" => $gal, "votes" => $newv, "cws" => $cws, "ncws" => _lobby_cw, "nnewsc" => _lobby_newsc, "newsc" => $newsc, "ngb" => _lobby_gb, "gb" => $gb, "nuser" => _lobby_user, "user" => $user, "nmgb" => _lobby_membergb, "mgb" => $membergb, "nmsg" => _msg, "nnews" => _lobby_news, "news" => $news, "away_new" => $away_new, "away_now" => $away_now, "neuerungen" => _lobby_new)); } else { $index = error(_error_have_to_be_logged, 1); } }
<th>被提问</th> <th>回答</th> <th>被采纳</th> <th>采纳率</th> <th width="50">操作</th> </tr> <?php foreach ($lists as $k => $v) { ?> <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center"> <td><input type="checkbox" name="itemid[]" value="<?php echo $v['itemid']; ?> "/></td> <td><img src="<?php echo useravatar($v['username']); ?> " alt="" style="padding:5px;"/></a></td> <td><a href="<?php echo $v['linkurl']; ?> " target="_blank"><?php echo $v['title']; ?> </a></td> <td><a href="javascript:_user('<?php echo $v['username']; ?> ');"><?php echo $v['passport']; ?>
while ($getcustom = _fetch($qrycustom)) { $qrycontent = db("SELECT " . $getcustom['feldname'] . " FROM " . $db['users'] . "\n\t \t\t \t\t WHERE id = '" . $userid . "'\n\t\t\t\t\t\t LIMIT 1"); $getcontent = _fetch($qrycontent); $custom_hardware .= show(_profil_edit_custom, array("name" => re(pfields_name($getcustom['name'])) . ":", "feldname" => $getcustom['feldname'], "value" => re($getcontent[$getcustom['feldname']]))); } if (!empty($get['icq']) && $get['icq'] != 0) { $icq = $get['icq']; } if ($get['nletter'] == 1) { $pnl = "checked=\"checked\""; } if ($get['pnmail'] == 1) { $pnm = "checked=\"checked\""; } $pic = userpic($get['id']); $avatar = useravatar($get['id']); if (!preg_match("#nopic#", $pic)) { $deletepic = "| " . _profil_delete_pic; } if (!preg_match("#noavatar#", $avatar)) { $deleteava = "| " . _profil_delete_ava; } $gmaps = show('membermap/geocoder', array()); if ($userid == $rootAdmin) { $delete = _profil_del_admin; } else { $delete = show("page/button_delete_account", array("id" => $get['id'], "action" => "action=editprofile&do=delete", "value" => _button_title_del_account, "del" => convSpace(_confirm_del_account))); } $show = show($dir . "/edit_profil", array("hardware" => _profil_hardware, "hphead" => _profil_hp, "country" => show_countrys($get['country']), "pcountry" => _profil_country, "about" => _profil_about, "picturehead" => _profil_pic, "contact" => _profil_contact, "preal" => _profil_real, "pnick" => _nick, "pemail1" => _email, "php" => _hp, "pava" => _profil_avatar, "pbday" => _profil_bday, "psex" => _profil_sex, "pname" => _loginname, "ppwd" => _new_pwd, "picq" => _icq, "psig" => _profil_sig, "ppic" => _profil_ppic, "phlswid" => _hlswid, "pcity" => _profil_city, "city" => re($get['city']), "psteamid" => _steamid, "nletter" => _profil_nletter, "pnmail" => _profil_pnmail, "pnl" => $pnl, "pnm" => $pnm, "pwd" => "", "dropdown_age" => $dropdown_age, "ava" => $avatar, "hp" => re($get['hp']), "gmaps" => $gmaps, "nick" => re($get['nick']), "name" => re($get['user']), "gmaps_koord" => re($get['gmaps_koord']), "rlname" => re($get['rlname']), "bdayday" => $bdayday, "bdaymonth" => $bdaymonth, "bdayyear" => $bdayyear, "sex" => $sex, "email" => re($get['email']), "icqnr" => $icq, "sig" => re_bbcode($get['signatur']), "hlswid" => $get['hlswid'], "steamid1" => $steamid1, "steamid2" => $steamid2, "steamid3" => $steamid3, "clan" => $clan, "pic" => $pic, "editpic" => _profil_edit_pic, "editava" => _profil_edit_ava, "deleteava" => $deleteava, "deletepic" => $deletepic, "favos" => _profil_favos, "pich" => _profil_ich, "pposition" => _profil_position, "pstatus" => _profil_status, "position" => getrank($get['id']), "value" => _button_value_edit, "status" => $status, "lang" => $language, "sonst" => _profil_sonst, "custom_about" => $custom_about, "custom_contact" => $custom_contact, "custom_favos" => $custom_favos, "custom_hardware" => $custom_hardware, "ich" => re_bbcode($get['beschreibung']), "del" => _profil_del_account, "delete" => $delete)); } $index = show($dir . "/edit", array("profilhead" => _profil_edit_head, "editgallery" => _profil_edit_gallery_link, "editprofil" => _profil_edit_profil_link, "nick" => autor($get['id']), "show" => $show));
<div class="bigtitle"> <h5>Kontakt</h5> Našli ste na webe chybu? Chcete sa nás niečo opýtať? Máte záujem stať sa súčasťou nášho tímu? Neváhajte a pošlite nám správu na email <strong>info(zavináč)desart.sk</strong> alebo nás kontaktujte súkromnou správou. </div> </div> <div class="bigtitlecenter"> <div class="bigtitle"> <h5>Aktuálny tím</h5> </div> </div> <div class="row"> <?php $result = dbquery("SELECT * FROM bg_users WHERE user_perm>='2' ORDER BY user_perm='3' DESC,user_perm='2' DESC,user_perm='4' DESC"); $rows1 = dbrows($result); while ($data = dbarray($result)) { echo ' <div class="col-md-2 col-xs-6 col-sm-4 text-center"> <div style="margin-bottom:20px"> <img src="' . useravatar($data["user_id"]) . '" class="img-circle img-responsive" alt="avatar" style="display:inline-block;width:120px;height:120px"> <h5>' . username($data["user_id"], 1) . '</h5><small style="color:#888">' . $adminprava[$data["user_perm"]] . '</small> </div> </div> '; } ?> </div> <?php require "../inc/footer.php";
if (!isset($touserid)) { redirect("/"); } if ($touserid == $userinfo["user_id"]) { redirect("/"); } $selmes = dbquery("SELECT * FROM bg_messages WHERE (mes_userid='" . $userinfo["user_id"] . "' AND mes_touserid='" . $touserid . "') OR (mes_userid='" . $touserid . "' AND mes_touserid='" . $userinfo["user_id"] . "') ORDER BY mes_id ASC"); $pocet = dbrows($selmes); if ($pocet >= 1) { while ($data = dbarray($selmes)) { if ($data["mes_userid"] == $userinfo["user_id"]) { $changepull = "pull-left"; } else { $changepull = "pull-left"; } echo ' <div class="media komentar"> <a class="' . $changepull . '"> <img class="media-object img-circle" src="' . (useravatar($data["mes_userid"]) != "/file/avatars/avatar.png" ? useravatar($data["mes_userid"]) : useravatar($data["mes_userid"])) . '" alt="avatar"> </a> <div class="media-body"> <h4 class="media-heading"><a class="profillink" data-target="65">' . username($data["mes_userid"]) . '</a> <span class="time pull-right">' . timeago($data["mes_time"]) . '</span></h4> ' . bbcode(badwords(smiley($data["mes_text"]))) . ' </div> </div> '; } } else { echo "<div style='padding:15px'>Žiadne správy s užívateľom <b>" . username($touserid, 0) . "</b></div>"; } dbquery("UPDATE bg_messages SET mes_read='1' WHERE mes_touserid='" . $userinfo["user_id"] . "' AND mes_userid='" . $touserid . "'");
public function add_comment() { $this->ajax_check_login(); if (!$this->permission['other_permission']['allow_comment']) { $this->ajax_failed_response("no-permission"); } $comment = delete_html($this->spArgs('comment')); $type = $this->spArgs('type', 'comment'); $share_id = $this->share_id; $ptx_share = spClass('ptx_share'); $share = $ptx_share->get_share_by_id($share_id); if (strlen($comment) > 210) { $this->ajax_failed_response(T('length_canot_over_140')); return; } if (!$comment || !$share) { $this->ajax_failed_response(T('fetch_data_failed')); return; } $at_array = $this->parse_at($comment, 'comment'); $tag_parse = $this->parse_tag($comment); $new_comment['comment_txt'] = $at_array['message']; $segment = spClass('Segment'); $new_comment['search_en'] .= ' ' . $segment->convert_to_py($tag_parse); $new_comment['search_en'] .= ' ' . $at_array['atsearch_str']; $new_comment['share_id'] = $share_id; $new_comment['user_id'] = $this->current_user['user_id']; $new_comment['create_time'] = time(); $ptx_comment = spClass('ptx_comment'); $result = $ptx_comment->add_one($new_comment); if ($result) { $new_comment['post_time_friend'] = friendlyDate($new_comment['create_time']); $new_comment['comment_id'] = $result; $new_comment['nickname'] = $this->current_user['nickname']; $new_comment['user_avatar'] = useravatar($new_comment['user_id'], 'middle'); $new_comment['comment_txt'] = parse_message($new_comment['comment_txt']); //$ptx_message = spClass("ptx_message"); //$ptx_message->add_comment($share_id,$share['title'],$this->current_user['user_id'],$share['user_id']); $event_dispatcher = spClass('event_dispatcher'); $event_data['to_user_id'] = $this->current_user['user_id']; $event_data['to_nickname'] = $this->current_user['nickname']; $event_data['share_id'] = $share_id; $event_data['share_title'] = $share['title']; $event_dispatcher->invoke('post_comment', $event_data); $event_data['from_user_id'] = $this->current_user['user_id']; $event_data['from_nickname'] = $this->current_user['nickname']; $event_data['to_user_id'] = $share['user_id']; $event_data['to_nickname'] = $share['user_nickname']; $event_data['event_code'] = 'alert'; $event_dispatcher->invoke('been_comment', $event_data); $this->ajax_success_response($new_comment, T('comment_succeed')); return; } else { $this->ajax_failed_response(T('comment_failed')); return; } }
$get_hp = $_POST['hp']; $get_email = $_POST['email']; $get_nick = $_POST['nick']; if (!$regCheck) { if ($get_hp) { $hp = show(_hpicon_forum, array("hp" => links($get_hp))); } if ($get_email) { $email = '<br />' . show(_emailicon_forum, array("email" => eMailAddr($get_email))); } $onoff = ""; $avatar = ""; $nick = show(_link_mailto, array("nick" => re($get_nick), "email" => $get_email)); } else { $hp = ""; $email = ""; $onoff = onlinecheck($get_userid); $nick = cleanautor($get_userid); } $titel = show(_eintrag_titel, array("postid" => $get_id, "datum" => date("d.m.Y", $get_date), "zeit" => date("H:i", $get_date) . _uhr, "edit" => $edit, "delete" => $delete)); $index = show("page/comments_show", array("titel" => $titel, "comment" => bbcode($_POST['comment'], 1), "nick" => $nick, "editby" => bbcode($editedby, 1), "email" => $email, "hp" => $hp, "avatar" => useravatar($get_userid), "onoff" => $onoff, "rank" => getrank($get_userid), "ip" => $userip . _only_for_admins)); echo '<table class="mainContent" cellspacing="1">' . $index . '</table>'; exit; break; } ## SETTINGS ## $time_end = generatetime(); $time = round($time_end - $time_start, 4); page($index, $title, $where, $time); ## OUTPUT BUFFER END ## gz_output();
function komentare($clanok, $type = "A", $link = "") { global $userinfo; echo '<div class="komentare" id="komentare">'; if (MEMBER) { if (isset($_GET["komentar"]) && isset($_GET["zmazat"]) && $_GET["zmazat"] != "") { if (!ctype_digit($_GET['zmazat'])) { redirect("/"); } $result66 = dbquery("SELECT * FROM bg_comments WHERE comment_id='" . strip_tags((int) $_GET["zmazat"]) . "' AND comment_type='" . $type . "'"); $rows55 = dbrows($result66); $data8 = dbarray($result66); if ($rows55 == 1) { if (!userperm("5")) { if ($data8["comment_userid"] == $userinfo["user_id"]) { dbquery("UPDATE bg_comments SET comment_delete='1' WHERE comment_id='" . strip_tags((int) $_GET["zmazat"]) . "' AND comment_type='" . $type . "'"); if ($link == "") { redirect("/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]) . "#komentare"); } else { redirect($link); } } else { redirect("/"); } } else { dbquery("UPDATE bg_comments SET comment_delete='1' WHERE comment_id='" . strip_tags((int) $_GET["zmazat"]) . "' AND comment_type='" . $type . "'"); dbquery("UPDATE bg_comments SET comment_delete='1' WHERE comment_type='" . $type . "' AND comment_reply='" . strip_tags((int) $_GET["zmazat"]) . "'"); if ($link == "") { redirect("/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]) . "#komentare"); } else { redirect($link); } } } else { redirect("/"); } } $antispamnum = rand(1, 99); if (isset($_POST["addcomment"]) && $_POST["textarea"] != "") { $text = trim(htmlspecialchars($_POST["textarea"], ENT_QUOTES, "UTF-8")); $reply = isset($_GET["reply"]) ? strip_tags((int) $_GET["reply"]) : "0"; if ($reply != 0) { $resultcom = dbquery("SELECT * FROM bg_comments WHERE comment_id='" . strip_tags((int) $_GET["reply"]) . "' AND comment_type='" . $type . "'"); $rows5com = dbrows($resultcom); if ($rows5com != 1) { if ($link == "") { redirect("/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]) . "#komentare"); } else { redirect($link); } } } if (!dbcount("(comment_id)", "bg_comments", "comment_userid='" . $userinfo["user_id"] . "' AND comment_time > " . strtotime("-30 seconds") . "")) { if ($text != "" and strlen($text) >= 8) { dbquery("INSERT INTO bg_comments(comment_userid, comment_text, comment_time, comment_pageid, comment_type, comment_reply)\n VALUES('" . $userinfo["user_id"] . "','" . $text . "','" . time() . "','" . $clanok . "','" . $type . "','" . $reply . "')"); } } if ($link == "") { redirect("/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]) . "#komentare"); } else { redirect($link); } } if (isset($_GET['reply'])) { if (!ctype_digit($_GET['reply'])) { redirect("/"); } } if (dbcount("(comment_id)", "bg_comments", "comment_userid='" . $userinfo["user_id"] . "' AND comment_time > " . strtotime("-30 seconds") . "")) { echo '<div class="alert alert-danger">O 30 sekúnd môžeš znova komentovať.</div>'; } echo '<div class="list-group komentboxarea ' . (isset($_GET['reply']) ? "showdiv" : "hidediv") . '" id="komreply"> <form name="form" action="#komentare" method="POST"> <div class="list-group-item list-group-item-info">Pridaj komentár</div> <textarea name="textarea" class="list-group-item" maxLength="800" rows="1" placeholder="text komentáru..." style="width:100%;padding:10px;font-size:12px;resize:vertical"></textarea> <div class="list-group-item"> <span class="bbcody"> <a href="javascript:addText(\'textarea\', \'[b]\', \'[/b]\', \'form\');" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="[b]tučný[/b]"><i class="fa fa-bold"></i></a> <a href="javascript:addText(\'textarea\', \'[i]\', \'[/i]\', \'form\');" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="[i]kurzíva[/i]"><i class="fa fa-italic"></i></a> <a href="javascript:addText(\'textarea\', \'[u]\', \'[/u]\', \'form\');" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="[u]podčiarknuté[/u]"><i class="fa fa-underline"></i></a> <a href="javascript:addText(\'textarea\', \'[url]\', \'[/url]\', \'form\');" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="[url]odkaz[/url]"><i class="fa fa-link"></i></a> </span> <span class="pull-right"> ' . (isset($_GET["reply"]) ? ' <a href="' . ($link == "" ? "/clanok/" . $_GET["id"] . "/" . strip_tags($_GET["n"]) . "#komentare" : $link) . '" class="btn btn-warning btn-sm">Zrušiť odpoveď</a>' : "") . ' <input name="addcomment" class="btn btn-success btn-sm" value="' . (isset($_GET["reply"]) ? 'Odpovedať na komentár ID #' . strip_tags((int) $_GET["reply"]) . '' : "Pridať komentár") . '" type="submit"> </span> <div class="clearfix"></div> </div> </form> </div> '; } else { echo '<div class="alert alert-info">Pred pridaním komentára sa musíš <a href="/registracia">zaregistrovať</a> alebo prihlásiť.</div>'; } echo ' <div class="page-header"> <h5>Komentáre ' . (!isset($_GET['reply']) ? '<a id="showcommentarea" class="btn btn-success btn-xs pull-right">Pridať komentár</a>' : '') . ' </h5> </div> '; if (isset($_GET["vsetkykomentare"]) && $_GET["vsetkykomentare"] == "zobrazit") { $comlimit = ""; } else { $comlimit = "LIMIT 0,7"; } $result2 = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' AND comment_pageid='" . $clanok . "' AND comment_type='" . $type . "' AND comment_reply='0' ORDER BY comment_id DESC"); $rows3 = dbrows($result2); if ($rows3 >= 1) { $result3 = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' AND comment_pageid='" . $clanok . "' AND comment_type='" . $type . "' AND comment_reply='0' ORDER BY comment_id DESC " . $comlimit); while ($data2 = dbarray($result3)) { $resultreply = dbquery("SELECT * FROM bg_comments WHERE comment_delete='0' AND comment_pageid='" . $clanok . "' AND comment_type='" . $type . "' AND comment_reply='" . $data2["comment_id"] . "' ORDER BY comment_id DESC"); // def reply $rowsrep = dbrows($resultreply); // def reply echo ' <div class="media komentar"> <a class="pull-left"> <img class="media-object img-circle" src="' . useravatar($data2["comment_userid"]) . '" alt="' . username($data2["comment_userid"]) . '"> </a> <div class="media-body"> <h4 class="media-heading">' . username($data2["comment_userid"], 1) . ' <span class="time">' . timeago($data2["comment_time"]) . '</span></h4> ' . wordwrap(bbcode(badwords(smiley($data2["comment_text"]))), 100, " ", 1) . ' <div class="clearfix"></div> <div class="buttonsinfo"> '; if (MEMBER) { echo '<a href="?reply=' . $data2["comment_id"] . '#komreply" class="btn btn-default btn-xs"><i class="fa fa-share"></i> Odpovedať</a> '; } if (SADMIN or MEMBER && $data2["comment_userid"] == $userinfo["user_id"]) { echo '<a href="?zmazat=' . $data2["comment_id"] . '&komentar" onclick="return confirm(\'Zmazať komentár užívateľa ' . username($data2["comment_userid"]) . ' ?\');" title="Odstrániť komentár" class="btn btn-default btn-xs"><i class="fa fa-ban"></i> Odstrániť komentár</a>'; } echo $rowsrep >= 3 ? ' <a class="btn btn-default btn-xs sreply" data-comid="' . $data2["comment_id"] . '"><i class="fa fa-level-down"></i> Zobraziť ďaľšie odpovede (' . ($rowsrep - 1) . ')</a>' : ""; echo '</div>'; $schovaj = $rowsrep >= 3 ? 'hidencom kom' . $data2["comment_id"] : ""; if ($rowsrep >= 1) { $i = 0; while ($datareply = dbarray($resultreply)) { echo ' <div class="media komentarreply ' . ($i == 0 ? "" : $schovaj) . '"> <a class="pull-left"> <img class="media-object img-circle" src="' . useravatar($datareply["comment_userid"]) . '" alt="' . username($datareply["comment_userid"]) . '"> </a> <div class="media-body"> <h4 class="media-heading">' . username($datareply["comment_userid"], 1) . ' <span class="time">' . timeago($datareply["comment_time"]) . '</span></h4> ' . wordwrap(bbcode(badwords(smiley($datareply["comment_text"]))), 100, " ", 1) . ' <div class="clearfix"></div> <div class="buttonsinfo"> '; if (SADMIN or MEMBER && $datareply["comment_userid"] == $userinfo["user_id"]) { echo '<a href="?zmazat=' . $datareply["comment_id"] . '&komentar" onclick="return confirm(\'Zmazať komentár užívateľa ' . username($datareply["comment_userid"]) . ' ?\');" title="Odstrániť komentár" class="btn btn-default btn-xs"><i class="fa fa-ban"></i> Odstrániť komentár</a>'; } echo ' </div> </div> </div> '; $i++; } } echo ' </div> </div> '; } if ($rows3 > "7") { if (isset($_GET["vsetkykomentare"]) && $_GET["vsetkykomentare"] == "zobrazit") { echo "<a href='?vsetkykomentare=skryt#komentare' class='buttonf'>Skryť všetky komentáre</a>"; } else { echo "<a href='?vsetkykomentare=zobrazit#komentare' class='buttonf'>Zobraziť všetky komentáre</a>"; } } } else { echo "<p style='padding: 10px;'>Žiadny komentár ešte nebol pridaný. Buďte prvý kto pridá komentár.</p>"; } echo "</div>"; }
} } echo ' </div> </div> </div> '; $doublepostuserid = 0; } else { echo ' <div class="row forumpost" id="p' . $dataf3["post_id"] . '"> <div class="col-md-1 visible-md visible-lg"> ' . (useravatar($dataf3["post_userid"]) != "avatar.png" ? '<img src="' . useravatar($dataf3["post_userid"]) . '" alt="avatar" class="img-responsive img-circle" style="max-width:60px;"/>' : '<img src="' . useravatar($dataf3["post_userid"]) . '" alt="avatar" class="img-responsive img-circle" style="max-width:60px;" />') . ' </div> <div class="col-md-11"> <div class="forumpostbody"> <div class="forumposthead ' . ($resultf5["post_id"] == $dataf3["post_id"] ? "" : "OSTATNEPOSTY") . '"> <a href="#p' . $dataf3["post_id"] . '" class="idf">#' . $i . '</a> <strong>' . username($dataf3["post_userid"], 1) . '</strong> — ' . ($permuser >= 2 ? $adminprava[$permuser] : userrank($dataf3["post_userid"], 1)) . '<span class="pull-right time">' . timeago($dataf3["post_time"]) . '</span> </div> ' . userdetect(smiley(bbcode(badwords(nl2br($dataf3["post_text"])), 1))) . ' <div class="forumpostfooter"> ' . ($dataf3["post_edittime"] ? 'Upravil/a ' . username($dataf3["post_edituser"], 1) . ' dňa ' . date("j. n. Y H:i:s", $dataf3["post_edittime"]) . '' : '') . '' . (SADMIN ? " IP: " . $dataf3["post_ip"] : "") . ' </div> '; if ($dataf2["forumt_locked"] == 0) {
$hp = ""; } else { $hp = show(_hpicon_forum, array("hp" => $getu['hp'])); } if (data($pUId, "signatur")) { $sig = _sig . bbcode(data($pUId, "signatur"), 1); } else { $sig = ""; } } else { $icq = ""; $pn = ""; $email = show(_emailicon_forum, array("email" => eMailAddr($_POST['email']))); if (empty($_POST['hp'])) { $hp = ""; } else { $hp = show(_hpicon_forum, array("hp" => links($_POST['hp']))); } } $index = show($dir . "/forum_posts_show", array("nick" => cleanautor($pUId, '', $_POST['nick'], $_POST['email']), "postnr" => "#" . ($i + ($page - 1) * $maxfposts), "p" => $i + ($page - 1) * $maxfposts, "class" => 'class="commentsRight"', "text" => bbcode($_POST['eintrag'], 1) . $editedby, "pn" => $pn, "icq" => $icq, "hp" => $hp, "email" => $email, "status" => getrank($pUId), "avatar" => useravatar($pUId), "ip" => $userip . '<br />' . _only_for_admins, "edited" => "", "posts" => $userposts, "titel" => $titel, "signatur" => $sig, "zitat" => _forum_zitat_preview, "onoff" => $onoff, "p" => "")); echo '<table class="mainContent" cellspacing="1" style="margin-top:17px">' . $index . '</table>'; exit; } break; } ## SETTINGS ## $time_end = generatetime(); $time = round($time_end - $time_start, 4); page($index, $title, $where, $time); ## OUTPUT BUFFER END ## gz_output();
$data = ''; $new = 0; $result = $db->query("SELECT * FROM {$table} WHERE fromuser='******' OR touser='******' ORDER BY lasttime DESC LIMIT 100"); while ($r = $db->fetch_array($result)) { if ($r['fromuser'] == $_username) { $r['user'] = $r['touser']; $r['new'] = $r['fnew']; } else { $r['user'] = $r['fromuser']; $r['new'] = $r['tnew']; } $new += $r['new']; $r['last'] = timetodate($r['lasttime'], $r['lasttime'] > $today_endtime - 86400 ? 'H:i:s' : 'y-m-d'); $r['online'] = online($r['user'], 1); $data .= '<div class="list-img list-chat">'; $data .= '<a href="chat.php?chatid=' . $r['chatid'] . '&reload=' . $DT_TIME . '"><img src="' . useravatar($r['user']) . '" width="40" height="40"/>'; $data .= '<ul>'; $data .= '<li><span>' . $r['last'] . '</span><strong>' . $r['user'] . '</strong></li>'; $data .= '<li>' . ($r['new'] ? '<em>' . $r['new'] . '</em>' : '') . ($r['online'] ? $L['chat_online'] : $L['chat_offline']) . ' ' . $r['lastmsg'] . '</li>'; $data .= '</ul>'; $data .= '</a></div>'; } if ($new != $_chat) { $db->query("UPDATE {$DT_PRE}member SET chat={$new} WHERE userid={$_userid}"); $_chat = $new; } if (!$data) { $data = '<div class="main"><div style="padding:40px 0;text-align:center;">' . $L['chat_empty'] . '</div></div>'; } exit(convert($data, DT_CHARSET, 'UTF-8')); break;
$avatar = useravatar($_userid, 'large', 0, 2); switch ($action) { case 'update': $t = $avatar ? 1 : 0; $db->query("UPDATE {$DT_PRE}member SET avatar={$t} WHERE userid={$_userid}"); dheader('avatar.php?itemid=' . $DT_TIME); break; case 'delete': if ($avatar) { $img = array(); $img[1] = useravatar($_userid, 'large', 0, 2); $img[2] = useravatar($_userid, '', 0, 2); $img[3] = useravatar($_userid, 'small', 0, 2); $img[4] = useravatar($_username, 'large', 1, 2); $img[5] = useravatar($_username, '', 1, 2); $img[6] = useravatar($_username, 'small', 1, 2); foreach ($img as $i) { file_del($i); } if ($DT['ftp_remote'] && $DT['remote_url']) { require DT_ROOT . '/include/ftp.class.php'; $ftp = new dftp($DT['ftp_host'], $DT['ftp_user'], $DT['ftp_pass'], $DT['ftp_port'], $DT['ftp_path'], $DT['ftp_pasv'], $DT['ftp_ssl']); if ($ftp->connected) { foreach ($img as $i) { $t = explode("/file/", $i); $ftp->dftp_delete($t[1]); } } } } $db->query("UPDATE {$DT_PRE}member SET avatar=0 WHERE userid={$_userid}");
</div> </div> </div> <?php if (odkazactiveself("/tema")) { $subheadertitle_forum = dbquery("SELECT forumt_name,forumt_userid,forumt_time,forumt_id FROM bg_forumtopic WHERE forumt_id='" . (int) $_GET["idt"] . "'"); $forumtitle = dbarray($subheadertitle_forum); ?> <div class="subheadtitle"> <div class="row"> <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 visible-md visible-lg"> <img src="<?php echo useravatar($forumtitle["forumt_userid"]); ?> " class="img-circle" style="max-width:70px;"> </div> <div class="col-xs-6 col-sm-7 col-md-9"> <div style="font-size:16px;color:#dae2ef;line-height:35px"><?php echo $forumtitle["forumt_name"]; ?> </div> <div style="font-size:12px;color:#666b76;"><span class="label label-warning"><?php echo dbcount("(post_id)", "bg_forumtopicpost", " post_topicid='" . (int) $_GET["idt"] . "'") - 1; ?> odpovedí</span> Pridané <?php echo timeago($forumtitle["forumt_time"]); ?> </div>
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')) { die(""); } include "../inc/settings.php"; $puserr = dbquery("SELECT * FROM bg_users WHERE user_id='" . (int) $_GET["uid"] . "'"); $puser = dbarray($puserr); $validuser = dbrows($puserr); if ($validuser == 0) { die("Error."); } echo ' <div class="userprofilhead" style="background:#81c46b;border-bottom:5px solid #74b35f;padding:25px 30px;color:#fff;"> <div class="row"> <div class="col-md-2 hidden-xs"> ' . (useravatar($puser["user_id"]) != "/file/avatars/avatar.png" ? '<img src="' . useravatar($puser["user_id"]) . '" alt="avatar" class="img-responsive img-circle"/>' : '<img src="' . useravatar($puser["user_id"]) . '" alt="avatar" class="img-responsive img-circle"/>') . ' </div> <div class="col-md-5"> <h3>' . $puser["user_nick"] . '</h3> <small>' . $adminprava[$puser["user_perm"]] . '</small> </div> <div class="col-md-5 text-right" style="padding-top:10px;"> '; if (userrank($puser["user_id"], 0, 1) <= 5) { $res = ($ranknum[userrank($puser["user_id"], 0, 1)] - userrank($puser["user_id"])) / $ranknum[userrank($puser["user_id"], 0, 1)] * 100; echo ' <h4>Level: <strong>' . userrank($puser["user_id"], 1) . '</strong></h4> <div class="progress" style="background:#6ab455;box-shadow:none;padding:4px;border-radius: 16px;"> <div class="progress-bar progress-bar-success" style="width: ' . (100 - $res) . '%;background:#fff;border-radius: 16px;">
<div class="col-sm-10"><input id="password" name="password" class="form-control" type="password"></div> </div> <div class="form-group"> <label for="new_password" class="col-sm-2 control-label">Nové heslo:</label> <div class="col-sm-10"><input id="new_password" name="new_password" class="form-control" type="password"></div> </div> <div class="form-group"> <label for="new_password2" class="col-sm-2 control-label">Zopakujte nové heslo:</label> <div class="col-sm-10"><input id="new_password2" name="new_password2" class="form-control" type="password"></div> </div> <div class="page-header"><h4>Obrázok profilu</h4></div> <div class="form-group"> <label for="avatar" class="col-sm-2 control-label"><img src="' . useravatar($userinfo["user_id"]) . '" class="img-thumbnail"/></label> <div class="col-sm-10"><input type="file" name="avatar" id="avatar"> <p class="help-block">Maximálna veľkosť obrázku 1MB<br/> Povolené typy: .PNG, .JPG, .GIF.<br/> Presná veľkosť 100x100 pixelov</p></div> </div> <div class="page-header"><h4>Kontaktné údaje</h4></div> <div class="form-group"> <label for="email" class="col-sm-2 control-label">E-mail:</label> <div class="col-sm-10"><input id="email" name="email" value="' . $data["user_email"] . '" class="form-control" type="text"></div> </div> <div class="form-group"> <label for="skype" class="col-sm-2 control-label">Skype:</label> <div class="col-sm-10"><input id="skype" name="skype" value="' . $data["user_skype"] . '" class="form-control" type="text"></div> </div> <div class="form-group">
include tpl('header'); ?> <div class="tt">聊天记录</div> <table cellpadding="2" cellspacing="1" class="tb"> <tr> <th width="60">头像</th> <th width="160">会员</th> <th width="160">时间</th> <th>内容</th> </tr> <?php foreach ($lists as $k => $v) { ?> <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center"> <td><img src="<?php echo useravatar($v['name']); ?> " style="padding:5px;"/></td> <td> <?php if (check_name($v['name'])) { ?> <a href="javascript:_user('<?php echo $v['name']; ?> ')"><?php echo $v['name']; ?> </a> <?php } else {
?> "><span class="f_gray">游客</span></a> <?php } ?> </td> <td class="px11"><?php echo $v['fnew']; ?> </td> <td class="px11"><?php echo timetodate($v['freadtime'], 6); ?> </td> <td><img src="<?php echo useravatar($v['touser']); ?> " style="padding:5px;"/></td> <td><a href="javascript:_user('<?php echo $v['touser']; ?> ')"><?php echo $v['touser']; ?> </a></td> <td class="px11"><?php echo $v['tnew']; ?> </td> <td class="px11"><?php echo timetodate($v['treadtime'], 6);
$onoff = ""; $avatar = ""; $nick = show(_link_mailto, array("nick" => re($getc['nick']), "email" => eMailAddr($getc['email']))); } else { $email = ""; $hp = ""; $onoff = onlinecheck($getc['reg']); $nick = autor($getc['reg']); } $titel = show(_eintrag_titel, array("postid" => $i, "datum" => date("d.m.Y", $getc['datum']), "zeit" => date("H:i", $getc['datum']) . _uhr, "edit" => $edit, "delete" => $delete)); if ($chkMe == "4") { $posted_ip = $getc['ip']; } else { $posted_ip = _logged; } $comments .= show("page/comments_show", array("titel" => $titel, "comment" => bbcode($getc['comment']), "editby" => bbcode($getc['editby']), "nick" => $nick, "email" => $email, "hp" => $hp, "avatar" => useravatar($getc['reg']), "onoff" => $onoff, "rank" => getrank($getc['reg']), "ip" => $posted_ip)); $i--; } if (settings("reg_artikel") == "1" && $chkMe == "unlogged") { $add = _error_unregistered_nc; } else { if (isset($userid)) { $form = show("page/editor_regged", array("nick" => autor($userid), "von" => _autor)); } else { $form = show("page/editor_notregged", array("nickhead" => _nick, "emailhead" => _email, "hphead" => _hp)); } //if(!ipcheck("evid(".$_GET['id'].")", $flood_newscom)) if (1 == 1) { $add = show("page/comments_add", array("titel" => _ev_comments_write_head, "bbcodehead" => _bbcode, "form" => $form, "show" => "none", "b1" => $u_b1, "b2" => $u_b2, "what" => _button_value_add, "ip" => _iplog_info, "sec" => $dir, "security" => _register_confirm, "preview" => _preview, "action" => '?action=show&do=add&w=k&id=' . $_GET['id'], "prevurl" => '../artikel/?action=compreview&id=' . $_GET['id'], "lang" => $language, "id" => $_GET['id'], "postemail" => "", "posthp" => "", "postnick" => "", "posteintrag" => "", "error" => "", "eintraghead" => _eintrag)); } else { $add = "";
?> Dnotification('new_message', '<?php echo $MODULE[2]['linkurl']; ?> message.php', '<?php echo useravatar($_username, 'large'); ?> ', '站内信(<?php echo $_message; ?> )', '收到新的站内信件,点击查看'); <?php } if ($_chat) { ?> Dnotification('new_chat', '<?php echo $MODULE[2]['linkurl']; ?> chat.php', '<?php echo useravatar($_username, 'large'); ?> ', '新对话(<?php echo $_chat; ?> )', '收到新的对话请求,点击交谈'); <?php } ?> </script> </body> </html>
$data = ''; $new = 0; $result = $db->query("SELECT * FROM {$table} WHERE fromuser='******' OR touser='******' ORDER BY lasttime DESC LIMIT 100"); while ($r = $db->fetch_array($result)) { if ($r['fromuser'] == $_username) { $r['user'] = $r['touser']; $r['new'] = $r['fnew']; } else { $r['user'] = $r['fromuser']; $r['new'] = $r['tnew']; } $new += $r['new']; $r['last'] = timetodate($r['lasttime'], $r['lasttime'] > $today_endtime - 86400 ? 'H:i:s' : 'y-m-d'); $r['online'] = online($r['user'], 1); $data .= '<table cellpadding="0" cellspacing="0"><tr><td width="60">'; $data .= '<a href="?chatid=' . $r['chatid'] . '" target="chat_' . $r['chatid'] . '"><img src="' . useravatar($r['user']) . '" width="48"' . ($r['online'] ? '' : ' class="chat_offline"') . '/></a>'; $data .= '</td><td><ul>'; $data .= '<li><span>' . $r['last'] . '</span><a href="?chatid=' . $r['chatid'] . '" target="chat_' . $r['chatid'] . '">' . $r['user'] . '</a></li>'; $data .= '<li>' . ($r['new'] ? '<em>' . $r['new'] . '</em>' : '') . ($r['online'] ? $L['chat_online'] : $L['chat_offline']) . ' ' . $r['lastmsg'] . '</li>'; $data .= '</ul></td></tr></table>'; } if ($new != $_chat) { $db->query("UPDATE {$DT_PRE}member SET chat={$new} WHERE userid={$_userid}"); $_chat = $new; } if (!$data) { $data = '<table cellpadding="0" cellspacing="0"><tr><td style="padding:40px 0;text-align:center;">' . $L['chat_empty'] . '</td></tr></table>'; } exit($data); break; default: