/** * Cast Question Votes * @param $info * @param int $points * @todo: move and improvise the voting system */ function set_forumVotes($info, $points = 0) { global $userdata; // @todo: extend on user's rank threshold before can vote. - Reputation threshold- Roadmap 9.1 // @todo: allow multiple votes / drop $res - Roadmap 9.1 if (checkgroup($info['forum_vote']) && dbcount("('thread_id')", DB_FORUM_THREADS, "thread_locked='0'")) { $data = array('forum_id' => $_GET['forum_id'], 'thread_id' => $_GET['thread_id'], 'post_id' => $_GET['post_id'], 'vote_points' => $points, 'vote_user' => $userdata['user_id'], 'vote_datestamp' => time()); $hasVoted = dbcount("('vote_user')", DB_FORUM_VOTES, "vote_user='******'user_id']) . "' AND thread_id='" . intval($_GET['thread_id']) . "'"); if (!$hasVoted) { $isSelfPost = dbcount("('post_id')", DB_FORUM_POSTS, "post_id='" . intval($_GET['post_id']) . "' AND post_user='******'user_id']) . ""); if (!$isSelfPost) { $result = dbquery_insert(DB_FORUM_VOTES, $data, 'save', array('noredirect' => 1, 'no_unique' => 1)); if ($result && $info['forum_answer_threshold'] > 0) { $vote_result = dbquery("SELECT SUM('vote_points'), thread_id FROM " . DB_FORUM_VOTES . " WHERE post_id='" . $data['post_id'] . "'"); $v_data = dbarray($vote_result); if ($info['forum_answer_threshold'] != 0 && $v_data['vote_points'] >= $info['forum_answer_threshold']) { $result = dbquery("UPDATE " . DB_FORUM_THREADS . " SET 'thread_locked'='1' WHERE thread_id='" . $v_data['thread_id'] . "'"); } } redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id']); } else { redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id'] . '&error=vote_self'); } } else { redirect(FORUM . "viewthread.php?thread_id=" . $_GET['thread_id'] . "&post_id=" . $_GET['post_id'] . '&error=vote'); } } }
function pdpDownload($id) { global $pdp, $userdata; if (!$id) { if (!iMEMBER) { return; } $this->user_name = $userdata['user_name']; $this->data = array('dl_name' => '', 'cat_id' => 0, 'dl_homepage' => '', 'dl_desc' => '', 'dl_abstract' => '', 'dl_copyright' => 'Copyright (C) ' . $userdata['user_name'] . ' ' . date('Y'), 'license_id' => 0, 'lizenz_url' => '', 'lizenz_okay' => 'N', 'lizenz_packet' => 'N'); return; } // get download $res = dbquery("SELECT d.*, c.cat_access, fu.user_name," . " c.cat_download_access," . " IF(LENGTH(dl_desc), dl_desc, dl_abstract) AS description" . " FROM " . DB_PDP_DOWNLOADS . " AS d" . " LEFT JOIN " . DB_PDP_CATS . " AS c" . " ON c.cat_id=d.cat_id" . " LEFT JOIN " . DB_USERS . " AS fu ON" . " d.user_id=fu.user_id" . " WHERE d.download_id='" . $id . "'" . " LIMIT 1"); if (dbrows($res) != 1) { fallback("index.php"); } $data = dbarray($res); if (!checkgroup($data['cat_access'])) { return; } $this->id = $id; $this->data = $data; $this->status = $data['dl_status']; $this->user_name = $data['user_name']; $this->description = $data['description']; //was enabled. why? unset($this->data['dl_status']); // check what we can do $this->can_edit = iPDP_ADMIN || iPDP_MOD || iMEMBER && $userdata['user_id'] == $this->data['user_id'] && ($pdp->settings['user_edit'] || $this->status == PDP_PRO_NEW) && $this->status != PDP_PRO_DEL && $this->status != PDP_PRO_CHECK; $this->can_download = iPDP_ADMIN || iPDP_MOD || checkgroup($data['cat_download_access']); // data[] should containt download-table data only unset($this->data['user_name']); unset($this->data['cat_access']); unset($this->data['cat_download_access']); unset($this->data['description']); }
function pdp_tmp_show_cat($parentid, $cat_array, $level, $sel_this) { $retval = ""; foreach ($cat_array as $myid => $thiscat) { if ($thiscat['parentcat'] == $parentid && checkgroup($thiscat['access'])) { $retval .= "<option value='{$myid}'" . ($sel_this == $myid ? " selected" : "") . ">" . str_repeat(" ", $level * 4) . $thiscat['name'] . "</option>"; $retval .= pdp_tmp_show_cat($myid, $cat_array, $level + 1, $sel_this); } } return $retval; }
function prp_count_cats($cat) { global $prp; $count = 0; $res = dbquery("SELECT cat_id, cat_access" . " FROM " . DB_PRP_CATS . "" . " WHERE top_cat='" . $cat . "'"); while ($data = dbarray($res)) { if ($prp->settings['hide_cats'] && !checkgroup($data['cat_access'])) { continue; } $count += prp_count_cats($data['cat_id']) + 1; } return $count; }
function mytask() { $user_id = $_SESSION['USERID']; $group = checkgroup($user_id); $filter = ''; if ($group != 2 && $group != 5) { $res_row = mysql_fetch_assoc(mysql_query("SELECT \tusers.id as person_id\r\n\t\t\t\t\t\t\t\t\t\t\tFROM \t`users`\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE \t`users`.`id` = {$user_id}")); $filter = "AND (task.responsible_user_id ='{$res_row['person_id']}')"; } $task_now_count1 = mysql_fetch_row(mysql_query(" SELECT IF(COUNT(*)>0,CONCAT('<span style=\"color:red;\">',COUNT(*),'</span>'), COUNT(*)),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tCOUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.`status` = 0 and task.actived=1 {$filter}")); $task_process_count1 = mysql_fetch_row(mysql_query(" SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.`status` = 1 and task.actived=1 {$filter}")); $task_done_count1 = mysql_fetch_row(mysql_query(" SELECT COUNT(*)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM `task`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE task.actived=1 AND task.`status` = 2 {$filter}")); $row = mysql_fetch_row(mysql_query("SELECT users.group_id\r\n\t\t\t\t\t\t\t\t FROM `users`\r\n\t\t\t\t\t\t\t\t WHERE users.id = '{$user_id}'")); if ($task_now_count1[1] > 0) { $new_task1 = '<span style="background-color: red; border-radius: 2px 2px 2px 2px; color: #FFFFFF; padding: 1px 2px; position: absolute; top: -5px; left: -6px;">NEW</span>'; } $my_task_hide1 = ''; if ($row[0] != '') { $my_task_hide1 = ' <div id="ctl00_ContentPlaceHolder1_tile_Declarations_NEW" class="tile_small" style="background:#9CC6F0; margin-top: 0px"> <p style="display: block!important;margin:8px 0 10px;">ჩემი დავალება</p> ' . $new_task1 . ' <div onclick="location.href=\'index.php?pg=13#tab-1\'" class="tile_waybill_notification tt-wrapper" title="გადაცემულია გასარკვევად" style="float: left; cursor: pointer;"> <span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_now_count1[0] . '</span> </div> <div onclick="location.href=\'index.php?pg=13#tab-2\'" class="tile_waybill_notification tt-wrapper" title="გარკვევის პროცესშია" style="float: left; cursor: pointer;"> <span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_process_count1[0] . '</span> </div> <div onclick="location.href=\'index.php?pg=13#tab-3\'" class="tile_waybill_notification tt-wrapper" title="მოგვარებულია" style="float: left; margin-top: 5px; cursor: pointer;"> <span id="ctl00_ContentPlaceHolder1_lblSavedDecl">' . $task_done_count1[0] . '</span> </div> </div> '; } else { $my_task_hide1 = ""; } return $my_task_hide1; }
function pdpDownload($id) { global $pdp, $userdata; if (!$id) { return; } // get download $res = dbquery("SELECT d.*, c.cat_access, fu.user_name," . " c.cat_download_access," . " IF(LENGTH(dl_desc), dl_desc, dl_abstract) AS description" . " FROM " . DB_PDP_DOWNLOADS . " AS d" . " LEFT JOIN " . DB_PDP_CATS . " AS c" . " ON c.cat_id=d.cat_id" . " LEFT JOIN " . DB_USERS . " AS fu ON" . " d.user_id=fu.user_id" . " WHERE d.download_id='" . $id . "'" . " LIMIT 1"); if (dbrows($res) != 1) { fallback("index.php"); } $data = dbarray($res); if (!checkgroup($data['cat_access'])) { return; } $this->id = $id; $this->data = $data; $this->status = $data['dl_status']; unset($this->data['dl_status']); // check what we can do $this->can_edit = iPDP_ADMIN || iPDP_MOD || iMEMBER && $userdata['user_id'] == $this->data['user_id'] && ($pdp->settings['user_edit'] || $this->status == PDP_PRO_NEW) && $this->status != PDP_PRO_DEL && $this->status != PDP_PRO_CHECK; $this->can_download = iPDP_ADMIN || iPDP_MOD || checkgroup($data['cat_download_access']); }
//GET ACCESS LEVEL AND REDIRECT IF CHEAT LOOP IS DETECTED $detect = dbquery("SELECT kroax_access,kroax_cat FROM " . $db_prefix . "kroax WHERE kroax_id='{$url}'"); while ($detect_access = dbarray($detect)) { $access = $detect_access['kroax_access']; $kroax_cat = $detect_access['kroax_cat']; } if (checkgroup($access)) { //PROCEED AS PLANNED } else { redirect(INFUSIONS . "the_kroax/kroax.php?noaccess"); } $detect = dbquery("SELECT access FROM " . $db_prefix . "kroax_kategori WHERE cid='{$kroax_cat}'"); while ($detect_access = dbarray($detect)) { $access = $detect_access['access']; } if (checkgroup($access)) { //PROCEED AS PLANNED } else { redirect(INFUSIONS . "the_kroax/kroax.php?noaccess"); } //END DETECTION $counthits = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_hits=kroax_hits+1 WHERE kroax_id='{$url}'"); $setplayed = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_lastplayed='" . time() . "' WHERE kroax_id='{$url}'"); $result = dbquery("SELECT * FROM " . $db_prefix . "kroax WHERE kroax_id='{$url}'"); $data = dbarray($result); $uresult = dbquery("SELECT user_id,user_name FROM " . $db_prefix . "users WHERE user_name='" . $data['kroax_uploader'] . "'"); $udata = dbarray($uresult); $url = $data['kroax_url']; $embed = $data['kroax_embed']; $thumb = $data['kroax_tumb']; $title = $data['kroax_titel'];
/*************************************************************************** * awEventCalendar * * * * Copyright (C) 2006-2008 Artur Wiebe * * wibix@gmx.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ require_once 'include/common.php'; if (!isset($_GET['id']) || !isNum($_GET['id'])) { fallback('index.php'); } if ($awec_settings['show_birthday_to_group'] == -1 || !checkgroup($awec_settings['show_birthday_to_group'])) { fallback('index.php'); } $res = dbquery("SELECT user_name, user_id,\n\tuser_birthdate AS event_date,\n\t(YEAR(CURDATE())-YEAR(user_birthdate)) AS years_old,\n\tDATE_FORMAT(user_birthdate, '" . $awec_settings['date_fmt'] . "') AS date\n\tFROM " . DB_USERS . "\n\tWHERE user_id='" . $_GET['id'] . "'"); if (dbrows($res) == 0) { fallback('index.php'); } $event = dbarray($res); $event['ev_title'] = sprintf($locale['awec_user_birthday']['title'], $event['user_name']); /* * GUI */ opentable($locale['EC300']); awec_menu(); ec_render_birthday($event); closetable();
private function temporary_permission() { // Thread View Only -- Post DB must exists to know if can be edited or not if (isset($thread_data['post_author'])) { //'edit_lock' => $forum_settings['forum_edit_lock'] ? TRUE : FALSE, $this->thread_info['permissions']['can_edit_post'] = iMOD || checkgroup($thread_data['forum_post']) && $thread_data['forum_lock'] == FALSE && $thread_data['post_author'] == $userdata['user_id'] ? TRUE : FALSE; } }
} } } if (!defined("iMOD")) { define("iMOD", false); } } else { redirect("index.php"); } } else { define("iMOD", false); } if (isset($_POST['step']) && $_POST['step'] != "") { $_GET['step'] = $_POST['step']; } if (!iMOD && !iADMIN || !checkgroup($data['forum_post'])) { redirect("index.php"); } if (isset($_POST['canceldelete'])) { redirect("viewthread.php?forum_id=" . $_GET['forum_id'] . "&thread_id=" . $_GET['thread_id']); } if (isset($_GET['step']) && $_GET['step'] == "renew") { $result = dbquery("SELECT post_id, post_author, post_datestamp FROM " . DB_POSTS . " WHERE thread_id='" . $_GET['thread_id'] . "' ORDER BY post_datestamp DESC LIMIT 0,1"); if (dbrows($result)) { $data = dbarray($result); $result = dbquery("UPDATE " . DB_POSTS . " SET post_datestamp='" . time() . "' WHERE post_id='" . $data['post_id'] . "'"); $result = dbquery("UPDATE " . DB_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $data['post_id'] . "' WHERE thread_id='" . $_GET['thread_id'] . "'"); $result = dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_lastuser='******'post_author'] . "' WHERE forum_id='" . $_GET['forum_id'] . "'"); opentable($locale['458']); echo "<div style='text-align:center'><br />\n" . $locale['459'] . "<br /><br />\n"; echo "<a href='viewforum.php?forum_id=" . $_GET['forum_id'] . "'>" . $locale['402'] . "</a><br /><br />\n";
$members = dbquery("SELECT * FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$data['group_id']}\$|\\\\.{$data['group_id']}\\\\.|\\\\.{$data['group_id']}\$') or user_groups='" . $data['group_id'] . "' ORDER BY user_level DESC, user_name"); $members = dbrows($members); $wallposts = dbcount("(comment_id)", DB_COMMENTS, "comment_type='g' and comment_item_id='" . $data['group_id'] . "'"); echo "<tr>\n<td class='tbl2' style='padding:7px;'><span style='font-size:13px;'><a href='" . FUSION_SELF . "?section=groups&view=" . $data['group_id'] . "' style='text-decoration:underline;'>" . $data['group_name'] . "</a></span>\n"; if ($data['group_description']) { echo "<br />\n<span class='small'>" . trimlink($data['group_description'], 30) . "</span>\n"; } echo "</td>\n"; echo "<td class='tbl1' style='white-space:nowrap;padding:7px;'>" . timePassed($data['group_created'], false) . "</td>\n"; echo "<td class='tbl2' style='text-align:center;padding:7px;'>{$members}</td>\n"; echo "<td class='tbl1' style='text-align:center;padding:7px;'>{$wallposts}</td>\n"; echo "<td class='tbl2' style='padding:7px;'>"; if ($wallposts) { $latest = dbarray(dbquery("select c.*, u.* from " . DB_COMMENTS . " c\n\t\t\t\tleft join " . DB_USERS . " u on u.user_id=c.comment_name\n\t\t\t\twhere c.comment_type='g' and c.comment_item_id='" . $data['group_id'] . "' order by c.comment_datestamp desc limit 1")); echo timepassed($latest['comment_datestamp']) . "<br />\n"; echo $locale['uc282'] . "<a href='" . BASEDIR . "profile.php?lookup=" . $latest['user_id'] . "'>" . showLabel($latest['user_id']) . "</a>\n"; } else { echo $locale['uc281']; } echo "</td>\n</tr>\n"; } } else { echo "<tr>\n<td class='tbl1' style='text-align:center;'>" . $locale['uc258'] . "</td>\n</tr>\n"; } echo "<tr>\n<td class='tbl1' style='text-align:center;'" . ($rows ? " colspan='5'" : "") . ">" . (checkgroup($fb4['group_create']) ? "<a href='" . FUSION_SELF . "?section=groups&action=create'>" . $locale['uc256'] . "</a> :: " : "") . "<a href='" . FUSION_SELF . "?section=groups&action=search'>" . $locale['uc257'] . "</a></td>\n</tr>\n"; } if (!defined("USER_CP")) { echo "</table>\n</td>\n</tr>\n</table>\n"; closetable(); require_once THEMES . "templates/footer.php"; }
include_once INCLUDES . "infusions_include.php"; // Check if a locale file is available that match the selected locale. if (file_exists(INFUSIONS . "shoutbox_panel/locale/" . LANGUAGE . ".php")) { // Load the locale file matching selection. include INFUSIONS . "shoutbox_panel/locale/" . LANGUAGE . ".php"; } else { // Load the default locale file. include INFUSIONS . "shoutbox_panel/locale/English.php"; } $shout_settings = get_settings("shoutbox_panel"); $archive_shout_link = ""; $archive_shout_message = ""; $result = dbquery("SELECT panel_access FROM " . DB_PANELS . " WHERE panel_filename='shoutbox_panel' AND panel_status='1'"); if (dbrows($result)) { $data = dbarray($result); if (!checkgroup($data['panel_access'])) { redirect(BASEDIR . "index.php"); } } else { redirect(BASEDIR . "index.php"); } if (iMEMBER && (isset($_GET['action']) && $_GET['action'] == "delete") && (isset($_GET['shout_id']) && isnum($_GET['shout_id']))) { if (iADMIN && checkrights("S") || iMEMBER && dbcount("(shout_id)", DB_SHOUTBOX, "shout_id='" . $_GET['shout_id'] . "' AND shout_name='" . $userdata['user_id'] . "' AND shout_hidden='0'")) { $result = dbquery("DELETE FROM " . DB_SHOUTBOX . " " . (multilang_table("SB") ? "WHERE shout_language='" . LANGUAGE . "' AND" : "WHERE") . " shout_id='" . $_GET['shout_id'] . "'" . (iADMIN ? "" : " AND shout_name='" . $userdata['user_id'] . "'")); } redirect(FUSION_SELF); } function sbawrap($text) { global $locale; $i = 0;
<?php require_once '../../includes/classes/core.php'; $action = $_REQUEST['act']; $error = ''; $data = ''; switch ($action) { case 'get_list': $count = $_REQUEST['count']; $hidden = $_REQUEST['hidden']; $user = $_SESSION['USERID']; $start = $_REQUEST['start']; $end = $_REQUEST['end']; $group_id = checkgroup($user); $rResult = mysql_query("SELECT incomming_call.date,\r\n\t\t incomming_call.date,\r\n \t\t incomming_call.phone,\r\n \t asterisk_incomming.dst_extension,\r\n \t\t asterisk_incomming.dst_queue,\r\n \t\t IF(asterisk_incomming.disconnect_cause='COMPLETECALLER', 'აბონენტმა გათიშა', 'ოპერატორმა გათიშა'),\r\n \t\t persons.`name`,\r\n\t\t SEC_TO_TIME(asterisk_incomming.duration),\r\n \t IF({$group_id}!=3,CONCAT('<p onclick=play(', '\\'', DATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(CONVERT(asterisk_incomming.file_name USING utf8),'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'', ')>მოსმენა</p>', '<a download=\\'audio.wav\\' href=\\'http://213.131.56.86:8989/', \r\n \t\t\tDATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(asterisk_incomming.file_name,'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'>ჩამოტვირთვა</a>'),\r\n \t\t\tCONCAT('<p onclick=play(', '\\'', DATE_FORMAT(asterisk_incomming.call_datetime, '%Y/%m/%d/'),(REPLACE(REPLACE(CONVERT(asterisk_incomming.file_name USING utf8),'/var/spool/asterisk/monitor/',''),'.wav','')),'.wav', '\\'', ')>მოსმენა</p>'))\r\n \r\n FROM incomming_call\r\n JOIN asterisk_incomming ON incomming_call.asterisk_incomming_id = asterisk_incomming.id\r\n JOIN users ON users.id = incomming_call.user_id\r\n JOIN persons ON persons.id = users.person_id\r\n WHERE DATE(incomming_call.date) BETWEEN '{$start}' AND '{$end}' AND incomming_call.call_status_id=1"); $data = array("aaData" => array()); while ($aRow = mysql_fetch_array($rResult)) { $row = array(); for ($i = 0; $i < $count; $i++) { $row[] = $aRow[$i]; } $data['aaData'][] = $row; } break; default: $error = 'Action is Null'; } $data['error'] = $error; echo json_encode($data); function checkgroup($user) {
echo "<span class='small'><strong>" . $locale['504'] . "</strong> " . showdate("shortdate", $data['user_joined']) . "</span><br />\n"; echo "<br /></td>\n<td valign='top' class='tbl1 forum_thread_user_post'>\n"; if (iMOD) { echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n"; } $message = parseubb($message); $message = isset($_GET['highlight']) ? "<div class='search_result'>" . $message . "</div>\n" : $message; echo nl2br($message); echo "<!--sub_forum_post_message-->"; $a_result = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . $data['post_id'] . "'"); $a_files = ""; $a_images = ""; $i_files = 0; $i_images = 0; if (dbrows($a_result)) { if (checkgroup($fdata['forum_attach_download'])) { while ($a_data = dbarray($a_result)) { if (!file_exists(FORUM . "attachments/" . $a_data['attach_name'])) { break; } if (in_array($a_data['attach_ext'], $imagetypes) && @getimagesize(FORUM . "attachments/" . $a_data['attach_name'])) { $a_images .= display_image_attach($a_data['attach_name'], "100", "100", $data['post_id']) . "\n"; $i_images++; } else { if ($i_files > 0) { $a_files .= "<br />\n"; } $a_files .= "<a href='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&getfile=" . $a_data['attach_id'] . "'>" . $a_data['attach_name'] . "</a> "; $a_files .= "[<span class='small'>" . parsebytesize(filesize(FORUM . "attachments/" . $a_data['attach_name'])) . " / " . $a_data['attach_count'] . $locale['507a'] . "</span>]\n"; $i_files++; }
echo "<br />\n<span class='small'>" . $data['weblink_cat_description'] . "</span>"; } echo "</td>\n"; $counter++; } echo "</tr>\n</table>\n"; } else { echo "<div style='text-align:center'><br />\n" . $locale['430'] . "<br /><br />\n</div>\n"; } closetable(); } else { $res = 0; $result = dbquery("SELECT weblink_cat_name, weblink_cat_sorting, weblink_cat_access FROM " . DB_WEBLINK_CATS . " WHERE weblink_cat_id='" . $_GET['cat_id'] . "'"); if (dbrows($result) != 0) { $cdata = dbarray($result); if (checkgroup($cdata['weblink_cat_access'])) { $res = 1; add_to_title($locale['global_201'] . $cdata['weblink_cat_name']); opentable($locale['400'] . ": " . $cdata['weblink_cat_name']); $rows = dbcount("(weblink_id)", DB_WEBLINKS, "weblink_cat='" . $_GET['cat_id'] . "'"); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows != 0) { $result = dbquery("SELECT weblink_id, weblink_name, weblink_description, weblink_datestamp, weblink_count FROM " . DB_WEBLINKS . " WHERE weblink_cat='" . $_GET['cat_id'] . "' ORDER BY " . $cdata['weblink_cat_sorting'] . " LIMIT " . $_GET['rowstart'] . "," . $settings['links_per_page']); $numrows = dbrows($result); $i = 1; while ($data = dbarray($result)) { if ($data['weblink_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) { $new = " <span class='small'>" . $locale['410'] . "</span>"; } else {
$locale += fusion_get_locale("", INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php"); } else { $locale += fusion_get_locale("", INFUSIONS . "downloads/locale/English/downloads.php"); } include INFUSIONS . "downloads/templates/downloads.php"; require_once INFUSIONS . "downloads/classes/Functions.php"; $dl_settings = get_settings("downloads"); if (!isset($_GET['download_id']) && !isset($_GET['cat_id'])) { add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name")); } add_breadcrumb(array('link' => INFUSIONS . 'downloads/downloads.php', 'title' => \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"))); $result = NULL; if (isset($_GET['file_id']) && isnum($_GET['file_id'])) { $res = 0; $data = dbarray(dbquery("SELECT download_url, download_file, download_cat, download_visibility FROM " . DB_DOWNLOADS . " WHERE download_id='" . intval($_GET['file_id']) . "'")); if (checkgroup($data['download_visibility'])) { $result = dbquery("UPDATE " . DB_DOWNLOADS . " SET download_count=download_count+1 WHERE download_id='" . intval($_GET['file_id']) . "'"); if (!empty($data['download_file']) && file_exists(DOWNLOADS . 'files/' . $data['download_file'])) { $res = 1; require_once INCLUDES . "class.httpdownload.php"; ob_end_clean(); $object = new httpdownload(); $object->set_byfile(DOWNLOADS . 'files/' . $data['download_file']); $object->use_resume = TRUE; $object->download(); exit; } elseif (!empty($data['download_url'])) { $res = 1; $url_prefix = !strstr($data['download_url'], "http://") && !strstr($data['download_url'], "https://") ? "http://" : ""; redirect($url_prefix . $data['download_url']); }
function forum_newtopic() { global $settings, $locale; if (isset($_POST['select_forum'])) { $_POST['forum_sel'] = isset($_POST['forum_sel']) && isnum($_POST['forum_sel']) ? $_POST['forum_sel'] : 0; redirect(FORUM . 'post.php?action=newthread&forum_id=' . $_POST['forum_sel']); } echo openmodal('newtopic', $locale['forum_0057'], array('button_id' => 'newtopic', 'class' => 'modal-md')); $index = dbquery_tree(DB_FORUMS, 'forum_id', 'forum_cat'); $result = dbquery("SELECT a.forum_id, a.forum_name, b.forum_name as forum_cat_name, a.forum_post\n\t\t FROM " . DB_FORUMS . " a\n\t\t LEFT JOIN " . DB_FORUMS . " b ON a.forum_cat=b.forum_id\n\t\t WHERE " . groupaccess('a.forum_access') . " " . (multilang_table("FO") ? "AND a.forum_language='" . LANGUAGE . "' AND" : "AND") . "\n\t\t (a.forum_type ='2' or a.forum_type='4') AND a.forum_post < " . USER_LEVEL_PUBLIC . " AND a.forum_lock !='1' ORDER BY a.forum_cat ASC, a.forum_branch ASC, a.forum_name ASC"); $options = array(); if (dbrows($result) > 0) { while ($data = dbarray($result)) { $depth = get_depth($index, $data['forum_id']); if (checkgroup($data['forum_post'])) { $options[$data['forum_id']] = str_repeat("—", $depth) . $data['forum_name'] . " " . ($data['forum_cat_name'] ? "(" . $data['forum_cat_name'] . ")" : ''); } } echo "<div class='well clearfix m-t-10'>\n"; echo form_select('forum_sel', $locale['forum_0395'], '', array('options' => $options, 'inline' => 1, 'width' => '100%')); echo "<div class='display-inline-block col-xs-12 col-sm-offset-3'>\n"; echo form_button('select_forum', $locale['forum_0396'], 'select_forum', array('class' => 'btn-primary btn-sm')); echo "</div>\n"; echo "</div>\n"; echo closeform(); } else { echo "<div class='well text-center'>\n"; echo $locale['forum_0328']; echo "</div>\n"; } echo closemodal(); }
if (checkgroup($cp_data['page_access'])) { ob_start(); eval("?>" . stripslashes($cp_data['page_content']) . "<?php "); $custompage = ob_get_contents(); ob_end_clean(); $custompage = preg_split("/<!?--\\s*pagebreak\\s*-->/i", $custompage); $pagecount = count($custompage); echo $custompage[$_GET['rowstart']]; } else { echo "<div class='admin-message' style='text-align:center'><br /><img style='border:0px; vertical-align:middle;' src ='" . BASEDIR . "images/warn.png' alt=''/><br /> " . $locale['400'] . "<br /><a href='index.php' onclick='javascript:history.back();return false;'>" . $locale['403'] . "</a>\n<br /><br /></div>\n"; } } else { add_to_title($locale['global_200'] . $locale['401']); echo "<!--custompages-pre-content-->\n"; opentable($locale['401']); echo "<div style='text-align:center'><br />\n" . $locale['402'] . "\n<br /><br /></div>\n"; } closetable(); if (isset($pagecount) && $pagecount > 1) { echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF . "?page_id=" . $_GET['page_id'] . "&") . "\n</div>\n"; } echo "<!--custompages-after-content-->\n"; if (dbrows($cp_result) && checkgroup($cp_data['page_access'])) { if ($cp_data['page_allow_comments']) { showcomments("C", DB_CUSTOM_PAGES, "page_id", $_GET['page_id'], FUSION_SELF . "?page_id=" . $_GET['page_id']); } if ($cp_data['page_allow_ratings']) { showratings("C", $_GET['page_id'], FUSION_SELF . "?page_id=" . $_GET['page_id']); } } require_once THEMES . "templates/footer.php";
require_once INCLUDES . "comments_include.php"; showcomments("P", DB_PHOTOS, "photo_id", $_GET['photo_id'], FUSION_SELF . "?photo_id=" . $_GET['photo_id']); } if ($data['photo_allow_ratings'] && $settings['ratings_enabled'] == "1") { require INCLUDES . "ratings_include.php"; showratings("P", $_GET['photo_id'], FUSION_SELF . "?photo_id=" . $_GET['photo_id']); } } } elseif (isset($_GET['album_id']) && isnum($_GET['album_id'])) { define("PHOTODIR", PHOTOS . (!SAFEMODE ? "album_" . $_GET['album_id'] . "/" : "")); $result = dbquery("SELECT album_title, album_description, album_thumb, album_access\r\n\tFROM " . DB_PHOTO_ALBUMS . " WHERE album_id='" . (int) $_GET['album_id'] . "'"); if (!dbrows($result)) { redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html")); } else { $data = dbarray($result); if (!checkgroup($data['album_access'])) { redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html")); } else { $rows = dbcount("(photo_id)", DB_PHOTOS, "album_id='" . (int) $_GET['album_id'] . "'"); add_to_title($locale['global_201'] . $data['album_title']); opentable($locale['420']); echo "<!--pre_album_info-->"; echo "<table cellpadding='0' cellspacing='0' width='80%' class='center'>\n<tr>\n"; echo "<td rowspan='2' align='center' class='tbl1 photogallery_album_thumb'><!--photogallery_album_thumb-->"; if ($data['album_thumb'] && file_exists(PHOTOS . $data['album_thumb'])) { echo "<img src='" . PHOTOS . $data['album_thumb'] . "' alt='" . $data['album_thumb'] . "' />"; } elseif (file_exists(PHOTOS . "nophoto.jpg")) { echo "<img src='" . PHOTOS . "nophoto.jpg' alt='" . $locale['432'] . "' title='" . $locale['432'] . "' style='border:0px' />"; } else { echo $locale['432']; }
$file = $_REQUEST['file_name']; switch ($action) { case 'get_add_page': $page = GetPage(); $data = array('page' => $page); break; case 'get_edit_page': $page = GetPage(Getincomming($task_id)); $data = array('page' => $page); break; case 'get_list': $count = $_REQUEST['count']; $hidden = $_REQUEST['hidden']; $user_id = $_REQUEST['user_id']; $user = $_SESSION['USERID']; $group = checkgroup($user); $filter = ''; if ($group != 2) { $filter = 'AND outgoing_call.responsible_user_id =' . $user; } $rResult = mysql_query("SELECT \t \t`task`.id,\r\n\t\t\t\t\t\t\t\t\t\t\t`task`.id,\r\n\t\t\t\t\t\t\t\t\t\t\t`site_user`.`name`,\r\n\t\t\t\t\t\t\t\t\t\t\t`site_user`.`pin`,\r\n\t\t\t\t\t\t\t\t\t\t\t`person1`.`name` ,\r\n\t\t\t\t\t\t\t\t\t\t\t`person2`.`name` ,\r\n\t\t\t\t\t\t\t\t\t\t\t`incomming_call`.date,\r\n\t\t\t\t\t\t\t\t\t\t\t`status`.`call_status`\r\n\t\t\t\t\t\t\t\tFROM \t\ttask\t\t\t\r\n\t\t\t\t\t\t\t\tLEFT JOIN \t\tincomming_call ON task.incomming_call_id=incomming_call.id\r\n\t\t\t\t\t\t\t\tLEFT JOIN \tsite_user\t\tON incomming_call.id=site_user.incomming_call_id\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tJOIN \t\tusers AS `user1`\t\t\tON task.responsible_user_id=user1.id\r\n\t\t\t\t\t\t\t\tJOIN \t\tpersons AS `person1`\t\tON user1.person_id=person1.id\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tJOIN \t\tusers AS `user2`\t\t\tON task.user_id=user2.id\r\n\t\t\t\t\t\t\t\tJOIN \t\tpersons AS `person2`\t\tON user2.person_id=person2.id\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tLEFT JOIN `status` \tON\ttask.`status`= `status`.id\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tWHERE \t\ttask.task_type_id=1 AND task.`status`=1"); $data = array("aaData" => array()); while ($aRow = mysql_fetch_array($rResult)) { $row = array(); for ($i = 0; $i < $count; $i++) { /* General output */ $row[] = $aRow[$i]; } $data['aaData'][] = $row; } break;
function navigation($main_menu = true) { if ($main_menu) { $link = Cache::read('navigation'); if (!$link) { $result = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t\t\t\t WHERE link_position='3' ORDER BY link_order"); $link = array(); while ($data = dbarray($result)) { $link[] = $data; } Cache::write('navigation', $link); } echo "<ul>\n"; foreach ($link as $data) { if (checkgroup($data['link_visibility'])) { $link_target = $data['link_window'] == "1" ? " target='_blank'" : ""; $li_class = preg_match("/^" . preg_quote(START_PAGE, '/') . "/i", $data['link_url']) ? " class='current'" : ""; if (strstr($data['link_name'], "%submenu% ")) { echo " <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb(str_replace("%submenu% ", "", $data['link_name']), "b|i|u|color") . "</span></a>\n <ul class='children'>\n"; } elseif (strstr($data['link_name'], "%endmenu% ")) { echo " <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb(str_replace("%endmenu% ", "", $data['link_name']), "b|i|u|color") . "</span></a></li>\n </ul>\n </li>\n"; } elseif (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) { echo " <li{$li_class}><a href='" . $data['link_url'] . "'{$link_target}><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n"; } else { echo " <li{$li_class}><a href='/" . $data['link_url'] . "'{$link_target}><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n"; } } } echo " </ul>\n"; } else { $link = Cache::read('footer'); $list_open = false; if (!$link) { $result = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t\t\t\t WHERE link_position='1' ORDER BY link_order"); $link = array(); while ($data = dbarray($result)) { $link[] = $data; } Cache::write('footer', $link); } foreach ($link as $data) { if (checkgroup($data['link_visibility'])) { if ($data['link_name'] != "---" && $data['link_url'] == "---") { if ($list_open) { echo "\t\t\t</ul>\n\t\t</div>\n"; $list_open = false; } echo "\t\t<div class='footer grid_4'>\n\t\t\t<h3>" . parseubb($data['link_name'], "b|i|u|color") . "</h3>\n"; } elseif ($data['link_name'] == "---" && $data['link_url'] == "---") { echo "\t\t\t\t<li>Method does not exist anymore</li>\n"; } else { if (!$list_open) { echo "\t\t\t<ul>\n"; $list_open = true; } $link_target = $data['link_window'] == "1" ? " target='_blank'" : ""; if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) { echo "\t\t\t\t<li><a href='" . $data['link_url'] . "'" . $link_target . "><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n"; } else { echo "\t\t\t\t<li><a href='/" . $data['link_url'] . "'" . $link_target . "><span>" . parseubb($data['link_name'], "b|i|u|color") . "</span></a></li>\n"; } } } } if ($list_open) { echo "\t\t\t</ul>\n\t\t</div>\n"; } } }
for ($i = 0; $i < count($oldpath) - 1; $i++) { $newpath .= $oldpath[$i] . "/"; } if (is_dir($newpath . $settings['locale'])) { redirect_img_dir($newpath, $newpath . $settings['locale'] . "/"); } } } //locale dependent forum buttons if (iSUPERADMIN) { define("iMOD", true); } if (!defined("iMOD") && iMEMBER && $fdata['forum_moderators']) { $mod_groups = explode(".", $fdata['forum_moderators']); foreach ($mod_groups as $mod_group) { if (!defined("iMOD") && checkgroup($mod_group)) { define("iMOD", true); } } } if (!defined("iMOD")) { define("iMOD", false); } $caption = $fdata['forum_cat_name'] . " :: " . $fdata['forum_name']; add_to_title($locale['global_201'] . $fdata['forum_name']); if (isset($_POST['delete_threads']) && iMOD) { $thread_ids = ""; if (isset($_POST['check_mark']) && is_array($_POST['check_mark'])) { foreach ($_POST['check_mark'] as $thisnum) { if (isnum($thisnum)) { $thread_ids .= ($thread_ids ? "," : "") . $thisnum;
} } if (!$res) { redirect($settings['opening_page']); } } else { $posts_per_page = 20; if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } $result = dbquery("SELECT fp.post_message, fp.post_datestamp, fp.post_edittime, fp.post_author, fp.post_edituser,\n fu.user_name AS user_name, fu.user_status AS user_status, fe.user_name AS edit_name, fe.user_status AS edit_status,\n ft.thread_subject, ff.forum_access\n FROM " . DB_FORUM_THREADS . " ft\n INNER JOIN " . DB_FORUM_POSTS . " fp ON ft.thread_id = fp.thread_id\n INNER JOIN " . DB_FORUMS . " ff ON ff.forum_id = ft.forum_id\n INNER JOIN " . DB_USERS . " fu ON fu.user_id = fp.post_author\n LEFT JOIN " . DB_USERS . " fe ON fe.user_id = fp.post_edituser\n WHERE ft.thread_id=" . $_GET['item_id'] . "\n ORDER BY fp.post_datestamp\n LIMIT " . $_GET['rowstart'] . ",{$posts_per_page}"); $res = FALSE; $i = 0; if (dbrows($result)) { while ($data = dbarray($result)) { if (checkgroup($data['forum_access'])) { $res = TRUE; if ($i == 0) { echo $locale['500'] . " <strong>" . $settings['sitename'] . " :: " . $data['thread_subject'] . "</strong><hr /><br />\n"; } echo "<div style='margin-left:20px'>\n"; echo "<div style='float:left'>" . $locale['501'] . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . $locale['502'] . showdate("forumdate", $data['post_datestamp']) . "</div><div style='float:right'>#" . ($i + 1) . "</div><div style='float:none;clear:both'></div><hr />\n"; echo nl2br(parseubb(parsesmileys($data['post_message']))); if ($data['edit_name'] != '') { echo "<div style='margin-left:20px'>\n<hr />\n"; echo $locale['503'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['502'] . showdate("forumdate", $data['post_edittime']); echo "</div>\n"; } echo "</div>\n"; echo "<br />\n"; $i++;
function render_item($item_id) { global $aidlink, $locale, $settings, $golddata, $_REQUEST, $_POST, $_GET; include INCLUDES . "comments_include.php"; include INCLUDES . "ratings_include.php"; echo "<table width='100%' cellpadding='0' cellspacing='0' class='tbl-border'>\n<tr>\n"; echo "<td valign='top' align='left'>\n"; $result = dbquery("SELECT * FROM " . DB_UG3_USAGE . " LEFT JOIN (" . DB_UG3_CATEGORIES . ")\n\t\t\t\t ON (" . DB_UG3_CATEGORIES . ".cat_id = " . DB_UG3_USAGE . ".category)\n\t\t\t\t WHERE " . DB_UG3_USAGE . ".id = '" . $item_id . "'\n\t\t\t\t LIMIT 1"); if (dbrows($result)) { $data = dbarray($result); if (checkgroup($data['cat_access'])) { echo "<table cellpadding='3' cellspacing='0' width='100%' class='tbl-border'>\n<tr>\n"; echo "<td align='left' valign='top'> </td>\n"; echo "<td algin='left' valign='top'><h3>" . $data['name'] . "</h3></td>\n"; echo "</tr><tr>\n"; echo "<td align='left' valign='top'><img src='" . GOLD_IMAGE_ITEM . $data['image'] . "' /></td>"; echo "<td algin='left' valign='top'>" . $data['description'] . "<br/><br />\n"; echo "<u>" . $locale['urg_shop_109'] . "</u> " . formatMoney($data['cost']) . "<br /><br />\n"; echo "<u>" . $locale['urg_shop_117'] . "</u> " . $data['stock'] . "<br /><br />\n"; if ($golddata['cash'] >= $data['cost']) { echo "<a href='index.php?op=shop_finalise&id=" . $data['id'] . "&return=" . urlencode(FUSION_SELF . "?op=shop_start&category=" . $data['category']) . "'>" . $locale['urg_shop_119'] . "</a>\n"; } elseif ($data['stock'] == 0) { echo "<strong>" . $locale['urg_shop_120'] . "</strong>\n"; } else { echo "<span style='color:red;'>" . sprintf($locale['urg_shop_121'] . " %s", formatMoney($data['cost'] - $golddata['cash'])) . "</span>\n"; } echo "</td>\n"; echo "</tr>\n</table>\n"; } else { echo $locale['urg_shop_150']; pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start'); } } else { echo $locale['urg_shop_151']; pagerefresh('meta', 3, FUSION_SELF . '?op=shop_start'); } echo "</td>\n"; echo "<td valign='top' align='left' width='150px'>\n"; echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr>\n"; echo "<td class='tbl2'><strong>" . $locale['urg_shop_152'] . "</strong></td>\n"; echo "</tr>\n"; $count = 0; $result = dbquery("SELECT ownerid FROM " . DB_UG3_INVENTORY . " WHERE itemid = '" . $item_id . "' AND ownerid != '" . $userdata['user_id'] . "' GROUP BY ownerid ORDER BY RAND()"); if (dbrows($result)) { while ($data = dbarray($result)) { if ($count < 5) { $result2 = dbquery("SELECT itemid FROM " . DB_UG3_INVENTORY . " WHERE ownerid = '" . $data['ownerid'] . "' AND itemid != '" . $item_id . "' GROUP BY itemid ORDER BY RAND() LIMIT 5"); while ($data2 = dbarray($result2)) { if ($count < 5) { $item = dbarray(dbquery("SELECT id, name, image FROM " . DB_UG3_USAGE . " WHERE id = '" . $data2['itemid'] . "' LIMIT 1")); echo "<tr>\n"; echo "<td><img src='" . GOLD_IMAGE_ITEM . $item['image'] . "' alt='" . $data['itemname'] . "' width='15px' height='15px' align='left' /> \n"; echo "<a href='" . FUSION_SELF . "?op=shop_item&id=" . $item['id'] . "'>" . trimlink($item['name'], 15) . "</a></td>\n"; echo "</tr>\n"; $count++; } else { break; } } } else { break; } } } else { echo "<tr><td>" . $locale['urg_shop_153'] . "</td></tr>\n"; } echo "</table>\n"; echo "</td>\n</tr>\n</table>\n"; echo "<div style='margin:5px'></div>\n"; showcomments("S", DB_UG3_USAGE, "id", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&id=" . $_REQUEST['id']); showratings("S", $_REQUEST['id'], FUSION_SELF . "?op=shop_item&id=" . $_REQUEST['id']); }
function showsublinks($sep = "·", $class = "") { global $settings; require_once INCLUDES . "mobile.menu.inc.php"; $mobile_icon = isset($default_mobile_icon) ? $default_mobile_icon : ''; $sres = dbquery("SELECT link_name, link_url, link_window, link_visibility FROM " . DB_SITE_LINKS . "\r\n\t " . (multilang_table("SL") ? "WHERE link_language='" . LANGUAGE . "' AND" : "WHERE") . " link_position>='2' ORDER BY link_order"); $mobile_link = array(); if (dbrows($sres)) { $i = 0; if ($settings['bootstrap']) { $res = "<nav class='navbar' role='navigation'>\n"; $res .= "<div class='mobile-menu'>\n<button type='button' class='navbar-toggle collapsed' data-toggle='collapse' data-target='#mp'><i class='entypo menu'></i></button>\n</div>\n"; $res .= "<div id='mp' class='navbar-collapse collapse'>\n"; // collect all navbar item. $res .= "<ul class='nav navbar-nav hidden-xs'>\n"; } else { $res = "<ul>\n"; } while ($sdata = dbarray($sres)) { $mobile_link[$sdata['link_name']] = $sdata['link_url']; // order, visibility, language - complied. $li_class = $class; $i++; if ($sdata['link_url'] != "---" && checkgroup($sdata['link_visibility'])) { $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : ""; if ($i == 1) { $li_class .= ($li_class ? " " : "") . "first-link"; } if (START_PAGE == $sdata['link_url']) { $li_class .= ($li_class ? " " : "") . "current-link"; } if (preg_match("!^(ht|f)tp(s)?://!i", $sdata['link_url'])) { $res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">" . $sep . "<a href='" . $sdata['link_url'] . "'" . $link_target . ">\n"; $res .= "<span>" . parseubb($sdata['link_name'], "b|i|u|color|img") . "</span></a></li>\n"; } else { $res .= "<li" . ($li_class ? " class='" . $li_class . "'" : "") . ">" . $sep . "<a href='" . BASEDIR . $sdata['link_url'] . "'" . $link_target . ">\n"; $res .= "<span>" . parseubb($sdata['link_name'], "b|i|u|color|img") . "</span></a></li>\n"; } } } if ($settings['bootstrap']) { $res .= "</ul>\n"; $res .= "<!--start of mobile menu -->\n"; $res .= "<div class='hidden-sm hidden-md hidden-lg mobile-panel m-0'>\n"; $res .= "<div class='mobile-pane'>\n"; $res .= "<div class='mobile-header'>\n"; $res .= "<button class='btn mobile-btn-close' data-toggle='collapse' data-target='#mp'>Close</button>\n"; $res .= "<div class='mobile-header-text text-center'>Navigation</div>"; $res .= "</div>\n"; if (count($mobile_link) > 0) { $res .= "<div class='row m-0 mobile-body'>\n"; foreach ($mobile_link as $link_name => $link_url) { $icon = array_key_exists($link_url, $mobile_icon) ? $mobile_icon[$link_url] : 'entypo layout'; $res .= "<div class='col-xs-3 mobile-grid text-center'><a href='{$link_url}' class='btn btn-menu btn-block btn-default m-b-10'><i class='" . $icon . "'></i><br/><span class='mobile-text'>" . trimlink($link_name, 10) . "</span></a></div>\n"; } $res .= "</div>\n"; } $res .= "</div>\n"; $res .= "</div>\n"; $res .= "<!--end of mobile menu -->\n"; } else { $res .= "</ul>\n"; } $res .= "</div>\n"; $res .= "</nav>\n"; return $res; } }
<?php require_once "../../../maincore.php"; require_once THEMES . "templates/admin_header.php"; include INFUSIONS . "al_register_mod/infusion_db.php"; if (!defined("IN_FUSION")) { die("access denied"); } if (file_exists(INFUSIONS . "al_register_mod/locale/" . $settings['locale'] . ".php")) { include INFUSIONS . "al_register_mod/locale/" . $settings['locale'] . ".php"; } else { include INFUSIONS . "al_register_mod/locale/English.php"; } require_once INFUSIONS . "al_register_mod/includes/functions.php"; if (!checkgroup(1) && !checkgroup(3)) { redirect(BASEDIR); } //nav opentable($locale['rm1']); echo "<a href='" . INFUSIONS . "al_register_mod/admin/index.php'>" . $locale['rm2'] . "</a> <a href='" . INFUSIONS . "al_register_mod/admin/index.php?p=rules'>" . $locale['rm3'] . "</a> <a href='" . INFUSIONS . "al_register_mod/admin/index.php?p=form'>" . $locale['rm4'] . "</a> <a href='" . INFUSIONS . "al_register_mod/admin/index.php?p=apps'>" . $locale['rm5'] . "</a> <a href='" . INFUSIONS . "al_register_mod/admin/index.php?p=addapp'>Add app</a>"; closetable(); if (!isset($_GET['p']) || $_GET['p'] == "" || !file_exists(INFUSIONS . "al_register_mod/admin/" . $_GET['p'] . ".php")) { //index opentable($locale['rm6']); echo $locale['rm7']; closetable(); } else { require_once INFUSIONS . "al_register_mod/admin/" . $_GET['p'] . ".php"; } require_once THEMES . "templates/footer.php";
require INCLUDES . "class.httpdownload.php"; function unstripinput($text) { if (QUOTES_GPC) { $text = stripslashes($text); } $search = array("\n", "&", """, "'", "\", """, "'", "<", ">"); $replace = array("\r\n", "&", "\"", "'", "\\", '\\"', "\\'", "<", ">"); $text = str_replace($search, $replace, $text); return $text; } if (isset($_GET['thread_id']) && isnum($_GET['thread_id']) && (isset($_GET['post_id']) && isnum($_GET['post_id'])) && (isset($_GET['code_id']) && isnum($_GET['code_id']))) { $result = dbquery("SELECT fp.*, ff.* FROM " . DB_POSTS . " AS fp\r\n\t\tINNER JOIN " . DB_FORUMS . " AS ff ON ff.forum_id=fp.forum_id\r\n\t\tWHERE fp.thread_id='" . $_GET['thread_id'] . "' AND fp.post_id='" . $_GET['post_id'] . "'"); if (dbrows($result)) { $data = dbarray($result); if (!checkgroup($data['forum_access']) || !$data['forum_cat']) { redirect(BASEDIR . "forum/viewthread.php?thread_id=" . $_GET['thread_id']); } $text = $data['post_message']; preg_match_all("#\\[geshi=(.*?)\\](.*?)\\[/geshi\\]#si", $text, $matches, PREG_PATTERN_ORDER); if (isset($matches[1][$_GET['code_id']]) && isset($matches[2][$_GET['code_id']])) { $ext = strtolower(str_replace("4strict", "", $matches[1][$_GET['code_id']])); $text = unstripinput($matches[2][$_GET['code_id']]); $filename = "geshi_" . $_GET['thread_id'] . "_" . $_GET['post_id'] . "_" . $_GET['code_id'] . "." . $ext; $object = new httpdownload(); $object->set_bydata($text); $object->use_resume = true; $object->set_filename($filename); $object->download(); } }
| This program is released as free software under the | Affero GPL license. You can redistribute it and/or | modify it under the terms of this license which you | can read by viewing the included agpl.txt or online | at www.gnu.org/licenses/agpl.html. Removal of this | copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ if (!defined("IN_FUSION")) { die("Access Denied"); } openside($locale['global_001']); $result = dbquery("SELECT * FROM " . DB_SITE_LINKS . " WHERE link_position<='2' ORDER BY link_order"); if (dbrows($result)) { while ($data = dbarray($result)) { if (checkgroup($data['link_visibility'])) { if ($data['link_name'] != "---" && $data['link_url'] == "---") { echo "<div class='side-label'><strong>" . $data['link_name'] . "</strong></div>\n"; } else { if ($data['link_name'] == "---" && $data['link_url'] == "---") { echo "<hr class='side-hr' />\n"; } else { $link_target = $data['link_window'] == "1" ? " target='_blank'" : ""; if (strstr($data['link_url'], "http://") || strstr($data['link_url'], "https://")) { echo THEME_BULLET . " <a href='" . $data['link_url'] . "'" . $link_target . " class='side'>" . $data['link_name'] . "</a><br />\n"; } else { echo THEME_BULLET . " <a href='" . BASEDIR . $data['link_url'] . "'" . $link_target . " class='side'>" . $data['link_name'] . "</a><br />\n"; } } } }
echo "<td align='center' class='tbl2'><strong>" . $pdata['forum_poll_title'] . "</strong></td>\n</tr>\n<tr>\n<td class='tbl1'>\n"; echo "<table align='center' cellpadding='0' cellspacing='0'>\n"; $presult = dbquery("SELECT * FROM " . DB_FORUM_POLL_OPTIONS . " WHERE thread_id='" . $_GET['thread_id'] . "' ORDER BY forum_poll_option_id ASC"); $poll_options = dbrows($presult); while ($pvdata = dbarray($presult)) { if (iMEMBER && isset($pdata['forum_vote_user_id']) || (!$fdata['forum_vote'] || !checkgroup($fdata['forum_vote']))) { $option_votes = $pdata['forum_poll_votes'] ? number_format(100 / $pdata['forum_poll_votes'] * $pvdata['forum_poll_option_votes']) : 0; echo "<tr>\n<td class='tbl1'>" . $pvdata['forum_poll_option_text'] . "</td>\n"; echo "<td class='tbl1'><img src='" . get_image("pollbar") . "' alt='" . $pvdata['forum_poll_option_text'] . "' height='12' width='" . 200 / 100 * $option_votes . "' class='poll' /></td>\n"; echo "<td class='tbl1'>" . $option_votes . "%</td><td class='tbl1'>[" . $pvdata['forum_poll_option_votes'] . " " . ($pvdata['forum_poll_option_votes'] == 1 ? $locale['global_133'] : $locale['global_134']) . "]</td>\n</tr>\n"; } else { echo "<tr>\n<td class='tbl1'><label><input type='radio' name='poll_option' value='" . $i . "' style='vertical-align:middle' /> " . $pvdata['forum_poll_option_text'] . "</label></td>\n</tr>\n"; $i++; } } if (iMEMBER && isset($pdata['forum_vote_user_id']) || (!$fdata['forum_vote'] || !checkgroup($fdata['forum_vote']))) { echo "<tr>\n<td align='center' colspan='4' class='tbl1'>" . $locale['480'] . " : " . $pdata['forum_poll_votes'] . "</td>\n</tr>\n"; } else { echo "<tr>\n<td class='tbl1'><input type='submit' name='cast_vote' value='" . $locale['481'] . "' class='button' /></td>\n</tr>\n"; } echo "</table>\n</td>\n</tr>\n</table>\n"; if (iMEMBER) { echo "</form>\n"; } } } } $result = dbquery("SELECT p.*, u.*, u2.user_name AS edit_name\n\tFROM " . DB_POSTS . " p\n\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\tLEFT JOIN " . DB_USERS . " u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'\n\tWHERE p.thread_id='" . $_GET['thread_id'] . "' ORDER BY post_datestamp LIMIT " . $_GET['rowstart'] . ",{$posts_per_page}"); if (iMOD) { echo "<form name='mod_form' method='post' action='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&rowstart=" . $_GET['rowstart'] . "'>\n"; }
} echo "<label><input type='checkbox' name='disable_smileys' value='1'" . $disable_smileys_check . " /> " . $locale['482'] . "</label>"; if (array_key_exists("user_sig", $userdata) && $userdata['user_sig']) { echo "<br />\n<label><input type='checkbox' name='show_sig' value='1'" . $sig_checked . " /> " . $locale['483'] . "</label>"; } if ($settings['thread_notify']) { echo "<br />\n<label><input type='checkbox' name='notify_me' value='1'" . $notify_checked . " /> " . $locale['486'] . "</label>"; } echo "</td>\n</tr>\n"; if ($fdata['forum_attach'] && checkgroup($fdata['forum_attach'])) { echo "<tr>\n<td width='145' class='tbl2'>" . $locale['464'] . "</td>\n"; echo "<td class='tbl1'><input type='file' name='attach' class='textbox' style='width:200px;' /><br />\n"; echo "<span class='small2'>" . sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes'])) . "</span></td>\n"; echo "</tr>\n"; } if ($fdata['forum_poll'] && checkgroup($fdata['forum_poll'])) { echo "<tr>\n<td align='center' colspan='2' class='tbl2'>" . $locale['467'] . "</td>\n"; echo "</tr>\n<tr>\n"; echo "<td width='145' class='tbl2'>" . $locale['469'] . "</td>\n"; echo "<td class='tbl1'><input type='text' name='poll_title' value='" . $poll_title . "' class='textbox' maxlength='255' style='width:250px' /></td>\n"; echo "</tr>\n"; $i = 1; if (isset($poll_opts) && is_array($poll_opts) && count($poll_opts)) { foreach ($poll_opts as $poll_option) { echo "<tr>\n<td width='145' class='tbl2'>" . $locale['470'] . " " . $i . "</td>\n"; echo "<td class='tbl1'><input type='text' name='poll_options[{$i}]' value='" . $poll_option . "' class='textbox' maxlength='255' style='width:250px'>"; if ($i == count($poll_opts)) { echo " <input type='submit' name='add_poll_option' value='" . $locale['471'] . "' class='button' />"; } echo "</td>\n</tr>\n"; $i++;