function img($dirurl, $dirname, $ex, $thumb, $isadmin = '', $ip = '', $time = '', $views = '') { global $base; $sitename = $_SERVER['HTTP_HOST']; $img = '<div class="showimage">'; $img .= '<div class="display">'; $img .= '<a href="' . getlink('show', array($dirurl, '&')) . '" target="_blank"><img src="' . $dirname . ($thumb ? '.th' : '') . $ex . '" alt="Host by ' . $sitename . '" /></a>'; if ($isadmin) { $img .= '<br />IP: ' . $ip . '<br />' . convertdate($time) . ', ' . $base['lang']['image_views'] . ' ' . $views . ' <a href="javascript:;" id="dc' . $dirurl . '" onClick="di(' . $dirurl . ')">' . $base['lang']['delete'] . '</a>'; } $img .= '</div>'; $img .= '<div class="imgcode"><span>' . $base['lang']['code_direct_url'] . '</span><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="' . getlink('show', array($dirurl, '&')) . '" readonly="true" /><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="' . $dirname . $ex . '" readonly="true" /><br />'; $img .= '<span>' . $base['lang']['code_bb_full'] . '</span><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="[url=' . getlink('show', array($dirurl, '&')) . '][img]' . $dirname . $ex . '[/img][/url]" readonly="true" /><br />'; if ($thumb) { $img .= '<span>' . $base['lang']['code_bb_thumb'] . '</span><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="[url=' . getlink('show', array($dirurl, '&')) . '][img]' . $dirname . '.th' . $ex . '[/img][/url]" readonly="true" /><br />'; } $img .= '<span>' . $base['lang']['code_html_full'] . '</span><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="<a href="' . getlink('show', array($dirurl, '&amp;')) . '" target="_blank"><img src="' . $dirname . $ex . '" alt="Host by ' . $sitename . '" /></a>" readonly="true" /><br />'; if ($thumb) { $img .= '<span>' . $base['lang']['code_html_thumb'] . '</span><br />'; $img .= '<input onmouseover="this.select();" name="" type="text" value="<a href="' . getlink('show', array($dirurl, '&amp;')) . '" target="_blank"><img src="' . $dirname . '.th' . $ex . '" alt="Host by ' . $sitename . '" /></a>" readonly="true" />'; } $img .= '</div>'; $img .= '</div>'; return $img; }
function getMonth($tracking_start_date = '') { if (empty($tracking_start_date)) { $tracking_start_date = strftime('%d-%m-%Y', time()); } $startdate = convertdate($tracking_start_date); $datetemp = getdate($startdate); $diff = ($datetemp['mday'] - 1) * $GLOBALS['oneday']; $startdate = $startdate - $diff; $enddate = $startdate + daysInMonth($datetemp['mon'], $datetemp['year']) * $GLOBALS['oneday']; return array('startdate' => $startdate, 'enddate' => $enddate); }
function get_last_post($id, $type, $cmd, $Mmod) { global $NPDS_Prefix; // $Mmod ne sert plus - maintenu pour compatibilité switch ($type) { case 'forum': $sql1 = "SELECT topic_time, current_poster FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id = '{$id}' ORDER BY topic_time DESC LIMIT 0,1"; $sql2 = "SELECT uname FROM " . $NPDS_Prefix . "users WHERE uid="; break; case 'topic': $sql1 = "SELECT topic_time, current_poster FROM " . $NPDS_Prefix . "forumtopics WHERE topic_id = '{$id}'"; $sql2 = "SELECT uname FROM " . $NPDS_Prefix . "users WHERE uid="; break; } if (!($result = sql_query($sql1))) { return "ERROR"; } if ($cmd == 'infos') { if (!($myrow = sql_fetch_row($result))) { $val = translate("No posts"); } else { $rowQ1 = Q_Select($sql2 . "'" . $myrow[1] . "'", 3600); $val = convertdate($myrow[0]) . '<br /><a href="user.php?op=userinfo&uname=' . $rowQ1[0]['uname'] . '" class="small">' . $rowQ1[0]['uname'] . '</a>'; } } sql_free_result($result); return $val; }
function userinfo($uname) { global $NPDS_Prefix; global $user, $sitename, $smilies, $short_user, $site_font; global $name, $email, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal; $uname = removeHack($uname); $result = sql_query("SELECT uid, name, femail, url, bio, user_avatar, user_icq, user_aim, user_yim, user_msnm, user_from, user_occ, user_intrest, user_sig, user_journal, mns FROM " . $NPDS_Prefix . "users WHERE uname='{$uname}'"); list($uid, $name, $femail, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal, $mns) = sql_fetch_row($result); if (!$uid) { header("location: index.php"); } global $cookie; include "header.php"; include_once "functions.php"; if ($uname == $cookie[1]) { echo ' <h2>' . translate("User") . '</h2> <h3>' . $uname . ', ' . translate("Welcome to") . ' ' . $sitename . '</h3> <p class="lead">' . translate("This is your personal page") . '</p>'; nav($mns); } $email = removeHack($femail); $name = stripslashes(removeHack($name)); $url = removeHack($url); $bio = stripslashes(removeHack($bio)); $user_icq = stripslashes(removeHack($user_icq)); $user_aim = stripslashes(removeHack($user_aim)); $user_yim = stripslashes(removeHack($user_yim)); $user_msnm = stripslashes(removeHack($user_msnm)); $user_from = stripslashes(removeHack($user_from)); $user_occ = stripslashes(removeHack($user_occ)); $user_intrest = stripslashes(removeHack($user_intrest)); $user_sig = nl2br(removeHack($user_sig)); $user_journal = stripslashes(removeHack($user_journal)); $op = "userinfo"; // include("modules/sform/extend-user/aff_extend-user.php");// nul quel est l'intérêt d'afficher un form quui n'a pas la fonction de form ? mais une fonctions d'affichage désépérément figé dans la structure du form ???? if (stristr($user_avatar, "users_private")) { $direktori = ""; } else { global $theme; $direktori = "images/forum/avatar/"; if (function_exists("theme_image")) { if (theme_image("forum/avatar/blank.gif")) { $direktori = "themes/{$theme}/images/forum/avatar/"; } } } if ($uname == $cookie[1]) { echo ' <div class="card text-xs-center"> <div class="card-header"> <img src="' . $direktori . $user_avatar . '" class="" /> <p class="card-text card-title "></p> </div> <div class="card-block"> <h3 class="card-title">' . $name . ' <span class="text-muted">alias</span> ' . $uname . '</h3> <p class="card-text">You can contact me @ ' . $email . ' ' . $user_icq . '</p> <p class="card-text">Don not forget to visit <a href="' . $url . '" class="oo">my web-site</a>'; if ($mns) { echo ' OR my <a href="minisite.php?op=' . $uname . '" target="_blank">' . translate("Mini-Web site") . '</a>'; } echo ' </p> </div> <div class="card-footer text-muted"> ' . $user_sig . ' </div> </div>'; } echo "<br />"; echo ' <h4>' . translate("Online journal for") . ' ' . $uname . '.</h4> <div id="online_user_journal" class="card card-block">' . $user_journal . '</div>'; $file = ''; $handle = opendir('modules/comments'); while (false !== ($file = readdir($handle))) { if (!preg_match('#\\.conf\\.php$#i', $file)) { continue; } $topic = "#topic#"; include "modules/comments/{$file}"; $filelist[$forum] = $url_ret; } closedir($handle); echo ' <h4>' . translate("Last 10 comments by") . ' ' . $uname . '.</h4> <div id="last_ten_comment" class="card card-block">'; $url = ''; $result = sql_query("SELECT topic_id, forum_id, post_text, post_time FROM " . $NPDS_Prefix . "posts WHERE forum_id<0 and poster_id='{$uid}' ORDER BY post_time DESC LIMIT 0,10"); while (list($topic_id, $forum_id, $post_text, $post_time) = sql_fetch_row($result)) { $url = str_replace("#topic#", $topic_id, $filelist[$forum_id]); echo "<p><a href=\"" . $url . "\">" . translate("Posted: ") . convertdate($post_time) . "</a></p>"; $message = smilie(stripslashes($post_text)); $message = aff_video_yt($message); $message = str_replace('[addsig]', '', $message); if (stristr($message, "<a href")) { $message = preg_replace('#_blank(")#i', '_blank\\1 class=\\1noir\\1', $message); } echo $message . '<hr />'; } echo '</div>'; echo ' <h4>' . translate("Last 10 news submissions sent by") . ' ' . $uname . '.</h4> <div id="last_ten_comment" class="card card-block">'; $xtab = news_aff("libre", "WHERE informant='{$uname}' ORDER BY sid DESC LIMIT 10", "", 10); $story_limit = 0; while ($story_limit < 10 and $story_limit < sizeof($xtab)) { list($sid, $catid, $aid, $title) = $xtab[$story_limit]; $story_limit++; echo "<p><a href=\"article.php?sid={$sid}\">" . aff_langue($title) . "</a></p>"; } echo '</div>'; include "footer.php"; }
function listdownloads($dcategory, $sortby, $sortorder) { global $perpage, $page, $download_cat, $user; global $NPDS_Prefix; if ($dcategory == "") { $dcategory = addslashes($download_cat); } if (!$sortby) { $sortby = "dfilename"; } if ($sortorder != "ASC" && $sortorder != "DESC") { $sortorder = "ASC"; } echo '<p class="lead">'; echo translate("Display filtered with") . " <i>"; if ($dcategory == translate("All")) { echo translate("All"); } else { echo aff_langue(stripslashes($dcategory)); } echo "</i> " . translate("sorted by") . " "; // Shiney SQL Injection 11/2011 $sortby2 = ""; if ($sortby == 'dfilename') { $sortby2 = translate("Name") . ""; } if ($sortby == 'dfilesize') { $sortby2 = translate("File Size") . ""; } if ($sortby == 'dcategory') { $sortby2 = translate("Category") . ""; } if ($sortby == 'ddate') { $sortby2 = translate("Creation Date") . ""; } if ($sortby == 'dver') { $sortby2 = translate("Version") . ""; } if ($sortby == 'dcounter') { $sortby2 = translate("Downloads") . ""; } // Shiney SQL Injection 11/2011 if ($sortby2 == '') { $sortby = 'dfilename'; } echo ' ' . translate("of") . ' <i>' . $sortby2 . '</i> </p>'; echo '<table class="table table-hover" id ="lst_downlo" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons">'; sortlinks($dcategory, $sortby); echo '<tbody>'; if ($dcategory == translate("All")) { $sql = "SELECT COUNT(*) FROM " . $NPDS_Prefix . "downloads"; } else { $sql = "SELECT COUNT(*) FROM " . $NPDS_Prefix . "downloads WHERE dcategory='" . addslashes($dcategory) . "'"; } $result = sql_query($sql); list($total) = sql_fetch_row($result); if ($total > $perpage) { $pages = ceil($total / $perpage); if ($page > $pages) { $page = $pages; } if (!$page) { $page = 1; } $offset = ($page - 1) * $perpage; } else { $offset = 0; $pages = 1; $page = 1; } settype($offset, "integer"); settype($perpage, "integer"); if ($dcategory == translate("All")) { $sql = "SELECT * FROM " . $NPDS_Prefix . "downloads ORDER BY {$sortby} {$sortorder} LIMIT {$offset},{$perpage}"; } else { $sql = "SELECT * FROM " . $NPDS_Prefix . "downloads WHERE dcategory='" . addslashes($dcategory) . "' ORDER BY {$sortby} {$sortorder} LIMIT {$offset},{$perpage}"; } $result = sql_query($sql); while (list($did, $dcounter, $durl, $dfilename, $dfilesize, $ddate, $dweb, $duser, $dver, $dcat, $ddescription, $dperm) = sql_fetch_row($result)) { $Fichier = new File($durl); // keep for extension $FichX = new FileManagement(); // essai class $okfile = autorisation($dperm); echo ' <tr> <td class="text-xs-center">'; if ($okfile == true) { echo popuploader($did, $ddescription, $dcounter, $dfilename, true); } else { echo popuploader($did, $ddescription, $dcounter, $dfilename, false); echo '<span class="text-warning">' . translate("Private") . '</span>'; } echo "</td><td class=\"text-xs-center\"><img src=\"" . $Fichier->Affiche_Extention() . "\" alt=\"" . $Fichier->Affiche_Extention() . "\" border=\"0\" /></td>\n <td>"; if ($okfile == true) { echo "<a href=\"download.php?op=mydown&did={$did}\" target=\"_blank\">{$dfilename}</a>"; } else { echo '...'; } echo '</td> <td>'; if ($dfilesize != 0) { // echo $Fichier->Pretty_Size($dfilesize); echo $FichX->file_size_auto($durl, 2); } else { // echo $Fichier->Affiche_Size(); echo $FichX->file_size_auto($durl, 2); } echo '</td> <td>' . aff_langue(stripslashes($dcat)) . '</td> <td>' . convertdate($ddate) . '</td> <td class="text-xs-center">' . $dver . '</td> <td class="text-xs-center">' . wrh($dcounter) . '</td> <td>'; if ($okfile == true and $user) { echo "<a href=\"download.php?op=broken&did={$did}\" title=\"" . translate("Report Broken Link") . "\"><i class=\"fa fa-lg fa-chain-broken\"></i></a>"; } echo ' </td> </tr>'; } echo ' </tbody> </table>'; $dcategory = StripSlashes($dcategory); echo '<ul class="pagination pagination-sm">'; if ($pages > 1) { $pcnt = 1; if ($page > 1) { echo ' <li class="page-item"> <a class="page-link" href="download.php?dcategory=' . $dcategory . '&sortby=' . $sortby . '&sortorder=' . $sortorder . '&page=' . ($page - 1) . '" aria-label="Previous" title="' . translate("Previous Page") . '"> <span aria-hidden="true">«</span> <span class="sr-only">Previous</span> </a> </li>'; } while ($pcnt < $page) { echo "<li class=\"page-item\"><a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&sortby={$sortby}&sortorder={$sortorder}&page={$pcnt}\">{$pcnt}</a></li>"; $pcnt++; } echo '<li class="page-item active"><a class="page-link" href="#">' . $page . '</a></li>'; $pcnt++; while ($pcnt <= $pages) { echo "<li class=\"page-item\"><a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&sortby={$sortby}&sortorder={$sortorder}&page={$pcnt}\">{$pcnt}</a></li>"; $pcnt++; } if ($page < $pages) { echo "<li class=\"page-item\">\n <a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&sortby={$sortby}&sortorder={$sortorder}&page=" . ($page + 1) . "\" aria-label=\"Next\" title=\"" . translate("Next Page") . "\">\n <span aria-hidden=\"true\">»</span>\n <span class=\"sr-only\">Next</span>\n </a>\n </li>\n"; } } echo '</ul>'; }
} if ($_REQUEST['itemid'] != 0 || $_REQUEST['itemid'] == "-") { $sqladd[] = "itemid='" . $_REQUEST['itemid'] . "'"; } if ($_REQUEST['itemname'] != '0') { $sqladd[] = "itemname='" . $modx->db->escape($_REQUEST['itemname']) . "'"; } if ($_REQUEST['message'] != "") { $sqladd[] = "message LIKE '%" . $modx->db->escape($_REQUEST['message']) . "%'"; } // date stuff if ($_REQUEST['datefrom'] != "") { $sqladd[] = "timestamp>" . convertdate($_REQUEST['datefrom']); } if ($_REQUEST['dateto'] != "") { $sqladd[] = "timestamp<" . convertdate($_REQUEST['dateto']); } // If current position is not set, set it to zero if (!isset($_REQUEST['int_cur_position']) || $_REQUEST['int_cur_position'] == 0) { $int_cur_position = 0; } else { $int_cur_position = $_REQUEST['int_cur_position']; } // Number of result to display on the page, will be in the LIMIT of the sql query also $int_num_result = is_numeric($_REQUEST['nrresults']) ? $_REQUEST['nrresults'] : $number_of_logs; $extargv = "&a=13&searchuser="******"&action=" . $_REQUEST['action'] . "&itemid=" . $_REQUEST['itemid'] . "&itemname=" . $_REQUEST['itemname'] . "&message=" . $_REQUEST['message'] . "&dateto=" . $_REQUEST['dateto'] . "&datefrom=" . $_REQUEST['datefrom'] . "&nrresults=" . $int_num_result . "&log_submit=" . $_REQUEST['log_submit']; // extra argv here (could be anything depending on your page) // build the sql $sql = 'SELECT * FROM ' . $modx->getFullTableName('manager_log') . (!empty($sqladd) ? ' WHERE ' . implode(' AND ', $sqladd) : '') . ' ORDER BY timestamp DESC'; //' LIMIT '.$int_cur_position.', '.$int_num_result; $rs = mysql_query($sql);
if ($myrow['image'] != "") { if ($ibid = theme_image("forum/subject/" . $myrow['image'])) { $imgtmp = $ibid; } else { $imgtmp = "images/forum/subject/" . $myrow['image']; } echo '<img class="smil" src="' . $imgtmp . '" border="0" alt="" />'; } else { if ($ibid = theme_image("forum/subject/icons/posticon.gif")) { $imgtmp = $ibid; } else { $imgtmp = "images/forum/icons/posticon.gif"; } echo '<img class="smil" src="' . $imgtmp . '" border="0" alt="" />'; } echo ' <span class="text-muted pull-right small">' . translate("Posted: ") . convertdate($myrow['post_time']) . '</span>'; echo '<div class="well">'; $message = stripslashes($myrow['post_text']); if ($allow_bbcode and $forum_type != 6 and $forum_type != 5) { $message = smilie($message); $message = aff_video_yt($message); } // <a href in the message if (stristr($message, "<a href")) { $message = preg_replace('#_blank(")#i', '_blank\\1 class=\\1noir\\1', $message); } $message = split_string_without_space($message, 80); if ($forum_type == "6" or $forum_type == "5") { highlight_string(stripslashes($myrow['post_text'])) . "<br /><br />"; } else { $message = str_replace("[addsig]", "<br /><br />" . nl2br($posterdata['user_sig']), $message);
<?php $queryx = mysql_query("SELECT * FROM tbl_forumreply WHERE forum='" . $_GET['thread'] . "' AND status='1'"); while ($row = mysql_fetch_assoc($queryx)) { ?> <div class='threadcover' style='margin-top:10px;'> <div class='threadcontent'> <?php $person = person($row['userid']); ?> <div class='trleft'> <?php echo convertdate($row['post_date']); ?> <p><img src='/account/assets/img/<?php echo strtolower($person['gender']); ?> .png'/></p> <p><?php echo $person['firstname'] . " " . $person['lastname']; ?> </p> </div> <div class='trright'> <?php echo $row['message']; ?>
} else { echo '<span class="paging">' . $nbpages . '</span>' . "\n\t\t\t"; } if ($pg < $nbpages) { echo '<a href="javascript:pagination('; echo $pg + 1; echo ');" class="paging">Suivant ></a>' . "\n\t\t\t"; } echo '</td>' . "\n\t\t" . '</tr> <!-- /Pagination -->' . "\n\t\t"; } //end if nbpages != 1 /*---------------------Fin pagination---------------------*/ /*---------- Début de l'affichage cellule par cellule, attention ceci est une boucle FOREACH ----------*/ echo '<tr>' . "\n"; foreach ($donnees as $key => $val) { $artdate = convertdate($val['artdate']); $brtag = "\n\t\t\t\t"; echo "\t\t\t" . '<td class="divviewimg">' . $brtag; echo $artdate . $brtag; $url = traiteurl($val['title']); echo '<a href="view-' . $url . '-' . $val['id'] . '.html" class="artview'; //echo '<a href="viewer.php?id='.$val['id'].'" class="artview'; if (mb_strlen($val['title']) > 35) { echo ' little'; } if (($key + 1) % 4 == 0) { echo ' viewleft'; } elseif (($key + 1) % 4 == 3) { echo ' viewleft'; } echo '">';
function ForumMaintTopicDetail($topic, $topic_title) { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <h3>' . adm_translate("Supprimer massivement les Topics") . '</h3> <form action="admin.php" method="post">'; $resultTT = sql_query("SELECT post_text, post_time FROM " . $NPDS_Prefix . "posts WHERE topic_id='{$topic}' ORDER BY post_time DESC limit 0,1"); list($post_text, $post_time) = sql_fetch_row($resultTT); echo "<input type=\"hidden\" name=\"op\" value=\"ForumMaintTopicSup\" /><input type=\"hidden\" name=\"topic\" value=\"{$topic}\" />"; echo "<b>Topic : {$topic} | " . stripslashes($topic_title) . "</b> | "; echo "<input class=\"btn btn-danger\" type=\"submit\" name=\"Topics_Del\" value=\"" . adm_translate("Effacer") . "\" /><hr noshade=\"noshade\" class=\"ongl\" />"; echo '[ ' . convertdate($post_time) . ' ]<br /><br />'; echo stripslashes($post_text); echo '</form>'; adminfoot('', '', '', ''); }
<th data-sortable="true">' . translate("Author") . '</th> <th data-sortable="true">' . translate("Posted") . '</th> </tr> </thead> <tbody>'; } echo ' <tr> <td align="left">' . ($count + 1) . '</td> <td align="left"><a href="viewforum.php?forum=' . $row['forum_id'] . '">' . stripslashes($row['forum_name']) . '</a></td>'; if ($row['arbre']) { $Hplus = "H"; } else { $Hplus = ""; } $ancre = ancre($row['forum_id'], $row['topic_id'], $row['post_id'], $posts_per_page); echo ' <td align="left"><a href="viewtopic' . $Hplus . '.php?topic=' . $row['topic_id'] . '&forum=' . $row['forum_id'] . $ancre . '" >' . stripslashes($row['topic_title']) . '</a></td> <td align="left"><a href="user.php?op=userinfo&uname=' . $row['uname'] . '" >' . $row['uname'] . '</a></td> <td align="left">' . convertdate($row['post_time']) . '</td> </tr>'; $count++; } } while ($row = sql_fetch_assoc($result)); echo ' </tbody> </table>'; } sql_free_result(); echo auto_complete('membre', 'uname', 'users', 'username', '86400'); include 'footer.php';
if (!defined('PHPHOTPIC')) { exit('Access Denied'); } $base['get']['id'] = intval($base['get']['id']); $image = $db->first("SELECT * FROM {$base['config']['db']['pre']}images WHERE id={$base['get']['id']} LIMIT 1"); if (!$image) { error_report($base['lang']['image_not_exist']); } $db->query("UPDATE {$base['config']['db']['pre']}images SET views=views+1 WHERE id={$base['get']['id']} LIMIT 1"); $base['title'] = 'Show image ' . $image['originalname']; $size = getimagesize($base['dir'] . '/i/' . $image['filename'] . $image['extension']); $sizew = $size[0]; $other = ""; if ($sizew > 800) { $sizeh = ceil($size[1] * 800 / $sizew); $other = " width='800' height='{$sizeh}'"; } $base['imagename'] = $image['originalname']; $base['imageviews'] = $image['views'] + 1; $base['imagedate'] = convertdate($image['time']); $base['show'] = '<img src="' . $base['config']['url'] . '/i/' . $image['filename'] . $image['extension'] . '" alt="' . htmlspecialchars($image['originalname']) . '"' . $other . ' />'; $base['isthumb'] = $image['isthumb']; $base['direct_url1'] = getlink('show', array($image['id'], '&')); $base['direct_url2'] = $base['config']['url'] . '/i/' . $image['filename'] . $image['extension']; $base['bb_full'] = '[url=' . getlink('show', array($image['id'], '&')) . '][img]' . $base['config']['url'] . '/i/' . $image['filename'] . $image['extension'] . '[/img][/url]'; $base['bb_thumb'] = '[url=' . getlink('show', array($image['id'], '&')) . '][img]' . $base['config']['url'] . '/i/' . $image['filename'] . '.th' . $image['extension'] . '[/img][/url]'; $base['html_full'] = '<a href="' . getlink('show', array($image['id'], '&')) . '" target="_blank"><img src="' . $base['config']['url'] . '/i/' . $image['filename'] . $image['extension'] . '" alt="Host by ' . $_SERVER['HTTP_HOST'] . '" /></a>'; $base['html_thumb'] = '<a href="' . getlink('show', array($image['id'], '&')) . '" target="_blank"><img src="' . $base['config']['url'] . '/i/' . $image['filename'] . '.th' . $image['extension'] . '" alt="Host by ' . $_SERVER['HTTP_HOST'] . '" /></a>'; unset($image); template('show');
$imgtmp = "images/forum/subject/" . $myrow['image']; } echo '<img class="n-smil" src="' . $imgtmp . '" alt="" />'; } else { if ($ibid = theme_image("forum/subject/icons/posticon.gif")) { $imgtmp = $ibid; } else { $imgtmp = "images/forum/icons/posticon.gif"; } echo '<img class="n-smil" src="' . $imgtmp . '" alt="" />'; } echo ' </span> </div> <div class="card-block"> <span class="text-muted float-xs-right small" style="margin-top:-1rem;">' . translate("Posted: ") . convertdate($myrow['post_time']) . '</span> <div class="card-text pt-2">'; $message = stripslashes($myrow['post_text']); if ($allow_bbcode and $forum_type != 6 and $forum_type != 5) { $message = smilie($message); $message = aff_video_yt($message); } // $message=split_string_without_space($message, 80); if ($forum_type == '6' or $forum_type == '5') { highlight_string(stripslashes($myrow['post_text'])) . '<br /><br />'; } else { $message = str_replace('[addsig]', '<div class="n-signature">' . nl2br($posterdata['user_sig']) . '</div>', $message); echo $message . ' </div>'; } echo '
while ($row = $coinquery->fetch_array(MYSQLI_BOTH)) { $coin = $row['coin']; $i++; } } $userquery = $link->query("SELECT * from anypic2u_user WHERE fbid='{$fbid}'"); $usernum = $userquery->num_rows; if ($usernum != 0) { $fetch_array = $userquery->fetch_array(MYSQLI_BOTH); $donate1 = $fetch_array['donate']; $vipdatequery = $link->query("SELECT * from anypic2u_vipdate WHERE fbid='{$fbid}'"); while ($row = $vipdatequery->fetch_array(MYSQLI_BOTH)) { $datex = $row['date']; } } $datex = convertdate($datex); ?> <div class="alert alert-warning" id="load"> <p><img src='img/20-0.gif' border='0'> <strong>หน้านี้จะใช้เวลาโหลดสักครู่นะครับ โปรดรอจนกว่าหน้านี้จะโหลดเสร็จ</strong></p> </div> <center><div class="fb-like-box" data-href="https://www.facebook.com/zxpic" data-width="500" data-height="210" data-show-faces="true" data-stream="false" data-show-border="false" data-header="true"></div></center> </br> <?php if ($donate1 == 2) { ?> <div class="alert alert-info"><center><strong>โปรดทราบ : </strong>สถานะ Donater ของคุณจะหมดลงในวันที่ <?php echo $datex; ?> </center></div> </br>
" title=""><?php echo $repost->post_name; ?> </a></h3> <p><?php echo truncateStr($repost->post_description, 300); ?> </p> <ul class="metas"> <li> <div class="user-avatar-small"><img src="images/profile.png" alt=""></div> <a href="#" title="">Salah Raddaoui</a> </li> <li><i class="fa fa-clock-o"></i> <?php echo convertdate($repost->post_datetime); ?> </li> </ul> </div><!-- content post --> </div><!--/ Single Post / Standard Post --> <?php } ?> <div class="single-post hidden"> <div class="top-post"> <div class="attachement-post postgallery-slider">
<strong>Position Title:</strong> <span style="color: #114B7D;"><?php echo stripslashes($jobdata['title']); ?> </span> </td> </tr> <tr> <td> <strong>Job Number:</strong> <span style="color: #114B7D;"><?php echo stripslashes($jobdata['jobnumber']); ?> </span> </td> </tr> <tr> <td> <!-- <strong>Date Posted:</strong> <span style="color: #114B7D;"><?php echo convertdate($jobdata['dateofpost']); ?> </span> --> </td> </tr> <tr> <td> <?php echo nl2br(stripslashes($jobdata['content'])); ?> </td> </tr> <tr> <td> <a href="index.php?page=jobform/apply.php&titleofrole=<?php echo stripslashes($jobdata['title']); ?>
$i++; } $result_links = $error ? $error : $i; } if (strpos($table, ";trackbacks;") > 0) { //引用 $arr_fields = array("logId" => "article_id", "blogUrl" => "url", "postTime" => "date", "tbTitle" => "title", "blogSite" => "blog_name", "content" => "properties"); $f2blog_table = "f2blog_trackbacks"; $insert_sql .= "TRUNCATE TABLE {$f2blog_table};\r\n"; $i = 0; $query = "select * from " . $_SESSION['s_dbPrefix'] . "trackbacks"; $result = mysql_query($query); //or die(mysql_error()); $error = mysql_error(); while ($arr_result = mysql_fetch_array($result)) { $arr_result['date'] = convertdate($arr_result['date']); $insert_field = array(); $insert_value = array(); foreach ($arr_fields as $key => $value) { $insert_field[] = $key; $insert_value[] = encode($arr_result[$value]); } $insert_sql .= "INSERT INTO {$f2blog_table}(" . implode(",", $insert_field) . ",isApp) VALUES('" . implode("','", $insert_value) . "','1');\r\n"; //是否分卷 if (strlen($insert_sql) >= $_SESSION['s_dbSize'] * 1000) { $p++; $msg = write_file($insert_sql, $filename); //写入分卷文件 $insert_sql = ""; } $i++;
function userinfo($uname) { global $NPDS_Prefix; global $user, $sitename, $smilies, $short_user, $site_font; global $name, $email, $url, $bio, $user_avatar, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal; $uname = removeHack($uname); $result = sql_query("SELECT uid, name, femail, url, bio, user_avatar, user_from, user_occ, user_intrest, user_sig, user_journal, mns FROM " . $NPDS_Prefix . "users WHERE uname='{$uname}'"); list($uid, $name, $femail, $url, $bio, $user_avatar, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal, $mns) = sql_fetch_row($result); if (!$uid) { header("location: index.php"); } global $cookie; include "header.php"; include_once "functions.php"; $email = removeHack($femail); $name = stripslashes(removeHack($name)); $url = removeHack($url); $bio = stripslashes(removeHack($bio)); $user_from = stripslashes(removeHack($user_from)); $user_occ = stripslashes(removeHack($user_occ)); $user_intrest = stripslashes(removeHack($user_intrest)); $user_sig = nl2br(removeHack($user_sig)); $user_journal = stripslashes(removeHack($user_journal)); $op = "userinfo"; if (stristr($user_avatar, "users_private")) { $direktori = ''; } else { global $theme; $direktori = "images/forum/avatar/"; if (function_exists("theme_image")) { if (theme_image("forum/avatar/blank.gif")) { $direktori = "themes/{$theme}/images/forum/avatar/"; } } } $my_rsos = array(); $socialnetworks = array(); $posterdata_extend = array(); $res_id = array(); $my_rs = ''; if (!$short_user) { $posterdata_extend = get_userdata_extend_from_id($uid); include 'modules/reseaux-sociaux/reseaux-sociaux.conf.php'; if ($posterdata_extend['M2'] != '') { $socialnetworks = explode(';', $posterdata_extend['M2']); foreach ($socialnetworks as $socialnetwork) { $res_id[] = explode('|', $socialnetwork); } sort($res_id); sort($rs); foreach ($rs as $v1) { foreach ($res_id as $y1) { $k = array_search($y1[0], $v1); if (false !== $k) { $my_rs .= '<a class="mr-1" href="'; if ($v1[2] == 'skype') { $my_rs .= $v1[1] . $y1[1] . '?chat'; } else { $my_rs .= $v1[1] . $y1[1]; } $my_rs .= '" target="_blank"><i class="fa fa-' . $v1[2] . ' fa-2x text-primary"></i></a> '; break; } else { $my_rs .= ''; } } } $my_rsos[] = $my_rs; } else { $my_rsos[] = ''; } } $posterdata = get_userdata_from_id($uid); $useroutils = ''; if ($user) { $useroutils .= '<a class=" text-primary mr-1" href="powerpack.php?op=instant_message&to_userid=' . $posterdata["uname"] . '" ><i class="fa fa-2x fa-envelope-o" title="' . translate("Send internal Message") . '" data-toggle="tooltip"></i></a> '; } if ($posterdata['femail'] != '') { $useroutils .= '<a class=" text-primary mr-1" href="mailto:' . anti_spam($posterdata['femail'], 1) . '" target="_blank" ><i class="fa fa-at fa-2x" title="' . translate("Email") . '" data-toggle="tooltip"></i></a> '; } if ($posterdata['url'] != '') { if (strstr('http://', $posterdata['url'])) { $posterdata['url'] = 'http://' . $posterdata['url']; } $useroutils .= '<a class=" text-primary mr-1" href="' . $posterdata['url'] . '" target="_blank" ><i class="fa fa-2x fa-external-link" title="' . translate("Visit this Website") . '" data-toggle="tooltip"></i></a> '; } if ($posterdata['mns']) { $useroutils .= '<a class=" text-primary mr-1" href="minisite.php?op=' . $posterdata['uname'] . '" target="_blank" target="_blank" ><i class="fa fa-2x fa-desktop" title="' . translate("Visit the Mini Web Site !") . '" data-toggle="tooltip"></i></a> '; } echo ' <div class="row"> <div class="col-sm-2"><img src="' . $direktori . $user_avatar . '" class=" rounded-circle center-block" /></div> <div class="col-sm-10"> <h2>' . translate("User") . ' <span class="text-muted">' . $uname . '</span></h2>'; if ($uname !== $cookie[1]) { echo $useroutils; } echo $my_rsos[0]; if ($uname == $cookie[1]) { // <h3>'.translate("Welcome to").' '.$sitename.'</h3> echo ' <p class="lead">' . translate("This is your personal page") . '</p>'; } echo ' </div> </div> <hr />'; if ($uname == $cookie[1]) { nav($mns); } echo ' <div class="card card-block"> <div class="row">'; if ($posterdata_extend['C7'] != '') { echo ' <div class="col-md-6">'; } else { echo ' <div class="col-md-12">'; } include "modules/sform/extend-user/aff_extend-user.php"; echo ' </div>'; if ($posterdata_extend['C7'] != '') { $content = ''; include 'modules/geoloc/geoloc_conf.php'; $content .= ' <div class="col-md-6"> <div id="map_user" style="width:100%; height:400px;"></div>'; $content .= ' <script type="text/javascript"> //<![CDATA[ var map_u, map_b, mapdivu = document.getElementById("map_user"), mapdivbl = document.getElementById("map_bloc"); function geoloc_loaduser() { icon_u = { path: fontawesome.markers.USER, scale: ' . $acg_sc . ', strokeWeight: ' . $acg_t_ep . ', strokeColor: "' . $acg_t_co . '", strokeOpacity: ' . $acg_t_op . ', fillColor: "' . $acg_f_co . '", fillOpacity: ' . $acg_f_op . ', }; icon_bl = { url: "' . $ch_img . $img_mbgb . '", size: new google.maps.Size(' . $w_ico_b . ',' . $h_ico_b . '), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(0, 0), scaledSize: new google.maps.Size(' . $w_ico_b . ', ' . $h_ico_b . ') }; //==> carte du bloc if (document.getElementById("map_bloc")) { map_b = new google.maps.Map(mapdivbl,{ center: new google.maps.LatLng(45, 0), zoom :3, zoomControl:false, streetViewControl:false, mapTypeControl: false, disableDoubleClickZoom: true }); map_b.setMapTypeId(google.maps.MapTypeId.' . $cartyp_b . '); function createMarkerB(point_b) { var marker_b = new google.maps.Marker({ position: point_b, map: map_b, icon: icon_bl }) return marker_b; } //== Fonction qui traite le fichier JSON == $.getJSON("modules/geoloc/include/data.json", {}, function(data){ $.each(data.markers, function(i, item){ var point_b = new google.maps.LatLng(item.lat,item.lng); var marker_b = createMarkerB(point_b); }); }); }; //<== carte du bloc map_u = new google.maps.Map(mapdivu,{ center: new google.maps.LatLng(' . $posterdata_extend['C7'] . ', ' . $posterdata_extend['C8'] . '), zoom :7, zoomControl:true, streetViewControl:true, mapTypeControl: true, scrollwheel: false, disableDoubleClickZoom: true }); map_u.setMapTypeId(google.maps.MapTypeId.' . $cartyp_b . '); function createMarkerU(point_u) { var marker_u = new google.maps.Marker({ position: point_u, map: map_u, title: "' . $uname . '", icon: icon_u }) return marker_u; } var point_u = new google.maps.LatLng(' . $posterdata_extend['C7'] . ',' . $posterdata_extend['C8'] . '); var marker_u = createMarkerU(point_u); } $(document.body).attr("onload", "geoloc_loaduser()"); //]]> </script>'; $content .= '<div class="mt-1"><a href="modules.php?ModPath=geoloc&ModStart=geoloc"><i class="fa fa-globe fa-lg"></i> [french]Carte[/french][english]Map[/english][chinese]地图[/chinese]</a>'; if ($admin) { $content .= ' <a href="admin.php?op=Extend-Admin-SubModule&ModPath=geoloc&ModStart=admin/geoloc_set"><i class="fa fa-cogs fa-lg"></i> [french]Admin[/french] [english]Admin[/english] [chinese]Admin[/chinese]</a>'; } $content .= '</div></div>'; $content = aff_langue($content); echo $content; } echo ' </div> </div>'; /* if ($uname == $cookie[1]) { echo ' <div class="card text-xs-center"> <div class="card-header"> <img src="'.$direktori.$user_avatar.'" class="n-ava thumbnail" /> <p class="card-text card-title "></p> </div> <div class="card-block"> <h3 class="card-title">'.$name.' <span class="text-muted">alias</span> '.$uname.'</h3> <p class="card-text">You can contact me @ '.$email.'</p> <p class="card-text">Don not forget to visit <a href="'.$url.'" class="oo">my web-site</a>'; if ($mns) {echo ' OR my <a href="minisite.php?op='.$uname.'" target="_blank">'.translate("Mini-Web site").'</a>';} echo ' </p> </div> <div class="card-footer text-muted"> '.$user_sig.' </div> </div>'; }; */ echo ' <br /> <h4>' . translate("Online journal for") . ' ' . $uname . '.</h4> <div id="online_user_journal" class="card card-block mb-1">' . $user_journal . '</div>'; $file = ''; $handle = opendir('modules/comments'); while (false !== ($file = readdir($handle))) { if (!preg_match('#\\.conf\\.php$#i', $file)) { continue; } $topic = "#topic#"; include "modules/comments/{$file}"; $filelist[$forum] = $url_ret; } closedir($handle); echo ' <h4 class="mt-1">' . translate("Last 10 comments by") . ' ' . $uname . '.</h4> <div id="last_ten_comment" class="card card-block mb-1">'; $url = ''; $result = sql_query("SELECT topic_id, forum_id, post_text, post_time FROM " . $NPDS_Prefix . "posts WHERE forum_id<0 and poster_id='{$uid}' ORDER BY post_time DESC LIMIT 0,10"); while (list($topic_id, $forum_id, $post_text, $post_time) = sql_fetch_row($result)) { $url = str_replace("#topic#", $topic_id, $filelist[$forum_id]); echo '<p><a href="' . $url . '">' . translate("Posted: ") . convertdate($post_time) . '</a></p>'; $message = smilie(stripslashes($post_text)); $message = aff_video_yt($message); $message = str_replace('[addsig]', '', $message); if (stristr($message, "<a href")) { $message = preg_replace('#_blank(")#i', '_blank\\1 class=\\1noir\\1', $message); } echo nl2br($message) . '<hr />'; } echo ' </div> <h4 class="mt-1">' . translate("Last 10 news submissions sent by") . ' ' . $uname . '.</h4> <div id="last_ten_comment" class="card card-block mb-1">'; $xtab = news_aff("libre", "WHERE informant='{$uname}' ORDER BY sid DESC LIMIT 10", '', 10); $story_limit = 0; while ($story_limit < 10 and $story_limit < sizeof($xtab)) { list($sid, $catid, $aid, $title) = $xtab[$story_limit]; $story_limit++; echo ' <p><a href="article.php?sid=' . $sid . '">' . aff_langue($title) . '</a></p>'; } echo ' </div> <hr /> <p class="n-signature">' . $user_sig . '</p>'; include "footer.php"; }
echo "<p align=\"center\"><img src=\"{$imgtmp}\" border=\"0\" alt=\"\" /></p>"; } } } echo "</td><td valign=\"top\" width=\"100%\" height=\"100%\">"; if ($myrow['image'] != '') { if ($ibid = theme_image("forum/subject/" . $myrow['image'])) { $imgtmp = $ibid; } else { $imgtmp = "images/forum/subject/" . $myrow['image']; } echo "<img src=\"{$imgtmp}\" border=\"0\" alt=\"\" />"; } else { echo "<img src=\"{$imgtmpPI}\" border=\"0\" alt=\"\" />"; } echo " " . translate("Posted: ") . convertdate($myrow['post_time']); echo "<br /><br />\n"; $message = stripslashes($myrow['post_text']); if ($allow_bbcode) { $message = smilie($message); $message = str_replace("[video_yt]", "http://www.youtube.com/watch?v=", $message); $message = str_replace("[/video_yt]", "", $message); } // <a href in the message if (stristr($message, "<a href")) { $message = preg_replace('#_blank(")#i', '_blank\\1 class=\\1\\1', $message); } $message = split_string_without_space($message, 80); if ($forum_type == '6' or $forum_type == '5') { highlight_string(stripslashes($myrow['post_text'])) . '<br /><br />'; } else {
public function createEvent() { /////////////// create the event /////////////////////// if (!$this->session->userdata('is_logged_in')) { redirect('users/login'); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $config['upload_path'] = './images/eventlogos'; ///////////////// upload the image for the event $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '2048'; $config['encrypt_name'] = true; $this->load->library('upload', $config); $logo = ""; if (!$this->upload->do_upload('file')) { $data = array('error' => $this->upload->display_errors()); $logo = 'noevent.jpg'; } else { $data = array('upload_data' => $this->upload->data()); $logo = $data['upload_data']['file_name']; ///////////////// event logo/image name for database } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $this->load->library('form_validation'); ///////////////// user for form validation ////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $this->form_validation->set_rules('hash', 'Hash', 'trim|xss_clean'); $hash_id = 0; if ($this->form_validation->run()) { if ($this->input->post('hash') != "") { $this->load->model('get_hash'); $new = array("hashtag" => $this->input->post('hash')); $hash_id = $this->get_hash->get_hash_id($new); /////////////////// event hashtag_id for the database } } else { } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $this->form_validation->set_rules('e_title', 'Title', 'required|trim'); $this->form_validation->set_rules('e_location', 'Location', 'required|trim'); $this->form_validation->set_rules('e_city', 'City', 'required|trim'); $this->form_validation->set_rules('e_type', 'Type', 'required|trim'); $this->form_validation->set_rules('e_s_date', 'S_date', 'required|trim'); $this->form_validation->set_rules('e_s_time', 'S_time', 'required|trim'); $this->form_validation->set_rules('e_f_date', 'F_date', 'trim'); $this->form_validation->set_rules('e_f_time', 'F_time', 'trim'); $this->form_validation->set_rules('e_desc', 'Description', 'required|trim'); if ($this->input->post('e_public')) { $e_pub = '1'; } else { $e_pub = '0'; } if ($this->input->post('e_access')) { $e_acc = '1'; } else { $e_acc = '0'; } $this->form_validation->set_rules('num_org', 'organisers', 'trim'); $this->form_validation->set_rules('num_link', 'links', 'trim'); if ($this->form_validation->run()) { $this->load->model("get_events"); if ($this->input->post('e_f_date')) { $fdate = convertdate($this->input->post('e_f_date')); } else { $fdate = ""; } if ($this->input->post('e_f_time')) { $ftime = converttime($this->input->post('e_f_time')); } else { $ftime = ""; } $created_time = date('Y/m/d h:i:s a', time()); $new = array("creator" => $this->session->userdata('user_id'), "title" => $this->input->post('e_title'), "location" => $this->input->post('e_location'), "city" => $this->input->post('e_city'), "sdate" => convertdate($this->input->post('e_s_date')), "stime" => converttime($this->input->post('e_s_time')), "fdate" => $fdate, "ftime" => $ftime, "desc" => $this->input->post('e_desc'), "event_public" => $e_pub, "event_logo" => $logo, "created_time" => $created_time, "approved" => 'y', "type" => $this->input->post('e_type')); ////////////////////////////////////////////////////////////////////////// $event_id = $this->get_events->create($new); echo $event_id; $this->load->model("get_organisers"); $org = array(); echo $this->input->post('num_org'); for ($i = 0; $i < $this->input->post('num_org'); $i++) { $orgid = $this->input->post('orgId' . $i); if ($this->input->post('orgName' . $i) && $event_id) { if (!$orgid) { $orgid = 0; } } array_push($org, array("name" => $this->input->post('orgName' . $i), "Description" => $this->input->post('orgDesc' . $i), "User_Id" => $orgid, "Event_Id" => $event_id)); } if ($org) { $this->get_organisers->add($org); } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// $this->load->model("get_tagPost"); $hashrow = array("tags_id" => $hash_id, "type" => 3, "parent_id" => $event_id); $this->get_tagPost->insert($hashrow); ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// $this->load->model("get_links"); $links = array(); for ($i = 0; $i < $this->input->post('num_link'); $i++) { if ($this->input->post('link' . $i) != "") { array_push($links, array("link" => $this->input->post('link' . $i), "link_detail" => $this->input->post('detLink' . $i), "event_id" => $event_id)); } } if ($links) { $this->get_links->add($links); } //print_r($links); ////////////////////////////////////////////////////////////////////////// redirect("site/events/" . $event_id); } else { $error = "The form has not been filled properly"; echo $error; redirect("site/createEventFail", $error); } }