コード例 #1
0
ファイル: theme.php プロジェクト: dioda/phpfusion
function render_article($subject, $article, $info)
{
    global $locale;
    opentable($subject);
    echo "<div class='floatfix'>" . ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "</div>\n<div class='news-footer'>\n\t" . articleposter($info, " &middot;") . articleopts($info, "&middot;") . itemoptions("A", $info['article_id']) . "\n</div>\n";
    closetable();
}
コード例 #2
0
ファイル: home.php プロジェクト: knapnet/PHP-Fusion
 function display_no_item()
 {
     global $locale;
     opentable($locale['home_0100']);
     echo $locale['home_0101'];
     closetable();
 }
コード例 #3
0
ファイル: render_functions.php プロジェクト: dioda/phpfusion
 function render_comments($c_data, $c_info)
 {
     global $locale;
     opentable($locale['c100']);
     if (!empty($c_data)) {
         echo "<div class='comments floatfix'>\n";
         $c_makepagenav = '';
         if ($c_info['c_makepagenav'] !== false) {
             echo $c_makepagenav = "<div style='text-align:center;margin-bottom:5px;'>" . $c_info['c_makepagenav'] . "</div>\n";
         }
         foreach ($c_data as $data) {
             echo "<div class='tbl2'>\n";
             if ($data['edit_dell'] !== false) {
                 echo "<div style='float:right' class='comment_actions'>" . $data['edit_dell'] . "\n</div>\n";
             }
             echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $data['i'] . "</a> |\n";
             echo "<span class='comment-name'>" . $data['comment_name'] . "</span>\n";
             echo "<span class='small'>" . $data['comment_datestamp'] . "</span>\n";
             echo "</div>\n<div class='tbl1 comment_message'>" . $data['comment_message'] . "</div>\n";
         }
         echo $c_makepagenav;
         if ($c_info['admin_link'] !== false) {
             echo "<div style='float:right' class='comment_admin'>" . $c_info['admin_link'] . "</div>\n";
         }
         echo "</div>\n";
     } else {
         echo $locale['c101'] . "\n";
     }
     closetable();
 }
コード例 #4
0
ファイル: faq.php プロジェクト: knapnet/PHP-Fusion
 function render_faq_item($info)
 {
     global $locale;
     echo "<span id='content'></span>\n";
     opentable($locale['401'] . ": " . $info['faq_cat_name']);
     echo "<a href='" . INFUSIONS . "faq/faq.php'>" . $locale['400'] . "</a> &gt; <a href='" . $info['faq_link'] . "'>" . $info['faq_cat_name'] . "</a>\n";
     if (!empty($info['nofaq_items'])) {
         echo "<div class='well text-center m-t-20'>" . $info['nofaq_items'] . "</div>\n";
     } else {
         echo "<div class='row m-t-20'>\n";
         echo "<div class='col-xs-12 col-sm-3'>\n";
         if (!empty($info['items'])) {
             echo "<ul>\n";
             foreach ($info['items'] as $data) {
                 echo "<li><a href='" . FUSION_REQUEST . "#faq_" . $data['faq_id'] . "'>" . $data['faq_question'] . "</a></li>\n";
             }
             echo "</ul>\n";
         }
         echo "</div>\n";
         echo "<div class='col-xs-12 col-sm-9'>\n";
         foreach ($info['items'] as $data) {
             echo "<a class='pull-right btn btn-xs btn-default' href='" . FUSION_REQUEST . "#content'><i class='fa fa-arrow-up'></i> " . $locale['402'] . "</a>\n";
             echo "<h4 id='faq_" . $data['faq_id'] . "'>" . $data['faq_question'] . "</h4>\n";
             echo nl2br(parse_textarea($data['faq_answer']));
             echo "<hr/>\n";
         }
         echo "</div>\n";
         echo "</div>\n";
     }
     closetable();
 }
コード例 #5
0
ファイル: weblinks.php プロジェクト: knapnet/PHP-Fusion
 function render_weblinks($info)
 {
     global $locale;
     echo render_breadcrumbs();
     opentable($locale['400']);
     if ($info['weblink_cat_rows'] != 0) {
         $counter = 0;
         $columns = 2;
         echo "<div class='row m-0'>\n";
         if (!empty($info['item'])) {
             foreach ($info['item'] as $weblink_cat_id => $data) {
                 if ($counter != 0 && $counter % $columns == 0) {
                     echo "</div>\n<div class='row m-0'>\n";
                 }
                 echo "<div class='col-xs-12 col-sm-6 col-md-6 col-lg-6 p-t-20'>\n";
                 echo "<div class='media'>\n";
                 echo "<div class='pull-left'><i class='entypo folder mid-opacity icon-sm'></i></div>\n";
                 echo "<div class='media-body overflow-hide'>\n";
                 echo "<div class='media-heading strong'><a href='" . $data['weblink_item']['link'] . "'>" . $data['weblink_item']['name'] . "</a> <span class='small'>" . $data['weblink_count'] . "</span></div>\n";
                 if ($data['weblink_cat_description'] != "") {
                     echo "<span>" . $data['weblink_cat_description'] . "</span>";
                 }
                 echo "</div>\n</div>\n";
                 echo "</div>\n";
                 $counter++;
             }
         }
         echo "</div>\n";
     } else {
         echo "<div style='text-align:center'><br />\n" . $locale['430'] . "<br /><br />\n</div>\n";
     }
     closetable();
 }
コード例 #6
0
ファイル: extras.inc.php プロジェクト: simplyianm/clububer
function extras_crime()
{
    //Crime, not finished
    global $HTTP_POST_VARS, $userdata, $locale, $settings, $golddata;
    table_top($locale['URG1554']);
    echo $locale['URG1552'];
    echo $locale['URG1553'];
    closetable();
}
コード例 #7
0
ファイル: error.php プロジェクト: php-fusion/PHP-Fusion
 function display_error_page($data)
 {
     $locale = fusion_get_locale();
     $text = $data['title'];
     $image = $data['image'];
     opentable($text);
     echo "<table class='table table-responsive' width='100%' style='text-center'>";
     echo "<tr>";
     echo "<td width='30%' align='center'><img class='img-responsive' src='" . $image . "' alt='" . $text . "' border='0'></td>";
     echo "<td style='font-size:16px;color:red' align='center'>" . $text . "</td>";
     echo "</tr>";
     echo "<tr>";
     echo "<td colspan='2' align='center'><b><a class='button' href='" . BASEDIR . "index.php'>" . $locale['errret'] . "</a></b></td>";
     echo "</tr>";
     echo "</table>";
     closetable();
 }
コード例 #8
0
function gold_admin_main()
{
    //Gold administration entry view
    global $locale, $aidlink;
    include GOLD_INC . "version_checker/version_checker.php";
    opentable($locale['urg_a_global_100'], '');
    echo "<div align='left' style='float: left; width: 50%;'>\n";
    echo $locale['urg_a_global_105'];
    /*if (gold_table_exists(DB_PREFIX."users_points")) {//Check if usergold 2 is installed or not
    		$rows = dbcount("(*)", DB_UG3);
    		if ($rows < 2) { 
    			echo "<br /><br />".$locale['urg_a_global_110']."<a href='install.php".$aidlink."'><strong>".$locale['urg_a_global_111']."</strong></a>".$locale['urg_a_global_112'];
    		}
    	}*/
    echo "</div><div align='right' style='float: right; width: 50%;'>\n";
    echo checkversion(GOLD_VERSION);
    echo "</div><div style='clear:both;'></div>\n";
    closetable();
}
コード例 #9
0
ファイル: login.php プロジェクト: knapnet/PHP-Fusion
 /**
  * Display Login form
  * @param array $info
  */
 function display_loginform(array $info)
 {
     global $locale, $userdata, $aidlink;
     opentable($locale['global_100']);
     if (iMEMBER) {
         $msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='" . $userdata['user_id'] . "' AND message_read='0' AND message_folder='0'");
         opentable($userdata['user_name']);
         echo "<div style='text-align:center'><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "edit_profile.php' class='side'>" . $locale['global_120'] . "</a><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "messages.php' class='side'>" . $locale['global_121'] . "</a><br />\n";
         echo THEME_BULLET . " <a href='" . BASEDIR . "members.php' class='side'>" . $locale['global_122'] . "</a><br />\n";
         if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
             echo THEME_BULLET . " <a href='" . ADMIN . "index.php" . $aidlink . "' class='side'>" . $locale['global_123'] . "</a><br />\n";
         }
         echo THEME_BULLET . " <a href='" . BASEDIR . "index.php?logout=yes' class='side'>" . $locale['global_124'] . "</a>\n";
         if ($msg_count) {
             echo "<br /><br />\n";
             echo "<strong><a href='" . BASEDIR . "messages.php' class='side'>" . sprintf($locale['global_125'], $msg_count);
             echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127']) . "</a></strong>\n";
         }
         echo "<br /><br /></div>\n";
     } else {
         echo "<div id='login_form' class='panel panel-default text-center text-dark'>\n";
         if (fusion_get_settings("sitebanner")) {
             echo "<a class='display-inline-block' href='" . BASEDIR . fusion_get_settings("opening_page") . "'><img src='" . BASEDIR . fusion_get_settings("sitebanner") . "' alt='" . fusion_get_settings("sitename") . "'/></a>\n";
         } else {
             echo "<a class='display-inline-block' href='" . BASEDIR . fusion_get_settings("opening_page") . "'>" . fusion_get_settings("sitename") . "</a>\n";
         }
         echo "<div class='panel-body text-center'>\n";
         echo $info['open_form'];
         echo $info['user_name'];
         echo $info['user_pass'];
         echo $info['remember_me'];
         echo $info['login_button'];
         echo $info['registration_link'] . "<br/><br/>";
         echo $info['forgot_password_link'] . "<br/><br/>";
         echo $info['close_form'];
         echo "</div>\n";
         echo "</div>\n";
     }
     closetable();
 }
コード例 #10
0
function render_post($post)
{
    global $locale, $settings;
    opentable($post['alb_post_title']);
    echo "<div class='post-item'>";
    echo "<div class='post-body'>" . $post['alb_post_text'] . "</div>";
    echo "<div class='post-footer'>";
    echo "<img src='" . AL_BLOG_DIR . "asset/images/user.png' class='icon' /><a href='" . BASEDIR . "profile.php?lookup=" . $post['alb_post_user'] . "'>" . $post['user_name'] . "</a>";
    echo "<img src='" . AL_BLOG_DIR . "asset/images/category.png' class='icon' />" . ($post['alb_cat_title'] != '' ? "<a href='" . FUSION_SELF . "?p=view_category&id=" . $post['alb_post_cat'] . "'>" . $post['alb_cat_title'] . "</a>" : $locale['alb21']);
    echo "<img src='" . AL_BLOG_DIR . "asset/images/calendar.png' class='icon' />" . showdate("forumdate", $post['alb_post_datestamp']);
    echo "<img src='" . AL_BLOG_DIR . "asset/images/comments.png' class='icon' />" . $post['comments'];
    //echo " <a href='".FUSION_SELF."?p=view_post&id=".$post['alb_post_id']."'>".$locale['alb22']."</a>";
    echo "</div>";
    echo "</div>";
    closetable();
    require_once INCLUDES . "comments_include.php";
    showcomments("BL", DB_AL_BLOG_POSTS, "alb_post_id", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']);
    require_once INCLUDES . "ratings_include.php";
    showratings("B", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']);
}
コード例 #11
0
ファイル: custompage.php プロジェクト: php-fusion/PHP-Fusion
 function render_custompage($info)
 {
     echo render_breadcrumbs();
     opentable($info['title']);
     echo "<!--cp_idx-->\n";
     if (!empty($info['error'])) {
         echo "<div class='well text-center'>\n";
         echo $info['error'];
         echo "</div>\n";
     } else {
         echo $info['body'][$_GET['rowstart']];
     }
     closetable();
     if (!empty($info['pagenav'])) {
         echo "<div class='display-block text-center m-t-5'>\n";
         echo $info['pagenav'];
         echo "</div>\n";
     }
     echo "<!--cp_sub_idx-->\n";
     echo $info['show_comments'];
     echo $info['show_ratings'];
 }
コード例 #12
0
 function render_comments($c_data, $c_info)
 {
     global $locale;
     opentable(format_word(number_format(count($c_data)), $locale['fmt_comment']));
     if (!empty($c_data)) {
         echo "<div class='comments floatfix'>\n";
         $c_makepagenav = '';
         if ($c_info['c_makepagenav'] !== FALSE) {
             echo $c_makepagenav = "<div style='text-align:center;margin-bottom:5px;'>" . $c_info['c_makepagenav'] . "</div>\n";
         }
         foreach ($c_data as $data) {
             echo "<div class='comments_container m-b-15'><div class='pull-left m-r-10'>";
             echo $data['user_avatar'];
             echo "</div>\n";
             echo "<div class='overflow-hide'>\n";
             if ($data['edit_dell'] !== FALSE) {
                 echo "\n\t\t\t\t\t<div class='pull-right text-smaller comment_actions'>\n\t\t\t\t\t" . $data['edit_dell'] . "\n\t\t\t\t\t</div>\n";
             }
             echo "<div class='comment_name'>\n";
             echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $data['i'] . "</a> ";
             echo $data['comment_name'];
             echo "<span class='text-smaller mid-opacity m-l-10'>" . $data['comment_datestamp'] . "</span>\n";
             echo "</div>\n";
             echo "<div class='comment_message'>" . $data['comment_message'] . "</div>\n";
             echo "</div>\n</div>\n";
         }
         echo $c_makepagenav;
         if ($c_info['admin_link'] !== FALSE) {
             echo "<div style='float:right' class='comment_admin'>" . $c_info['admin_link'] . "</div>\n";
         }
         echo "</div>\n";
     } else {
         echo "<div class='no_comment'>\n";
         echo $locale['c101'] . "\n";
         echo "</div>\n";
     }
     closetable();
 }
コード例 #13
0
function ConfigureVideo($ModPath, $ModStart, $class_sty_2)
{
    opentable();
    echo '<table width="100%" cellspacing="2" cellpadding="2" border="0">
   <tr><td class="header">' . video_yt_translate('Configuration du module vid&#xE9;o') . '</td>
   </tr><tr><td><font color=red>* </font>' . video_yt_translate('requis') . '</td></tr>
   </table>';
    opentable();
    echo '<form action="admin.php" method="post">';
    if (file_exists("modules/{$ModPath}/video_yt_conf.php")) {
        include "modules/{$ModPath}/video_yt_conf.php";
    }
    echo '<table width="100%" cellspacing="2" cellpadding="2" border="1"><tr>
   <td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Votre ID developpeur youtube') . '</span> <font color=red>*</font> </td><td><input type="text" size="33" maxlength="255" name="dev_id" value="' . $dev_id . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Votre clef developpeur youtube') . '</span> </td><td><input type="text" size="33" maxlength="255" name="dev_key" value="' . $dev_key . '"> </td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Votre username id') . '</span> <font color=red>*</font></td><td><input type="text" size="33" maxlength="255" name="account" value="' . $use_id . '"> </td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Votre username youtube') . '</span> <font color=red>*</font></td><td><input type="text" size="33" maxlength="255" name="account" value="' . $account . '"> </td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Username alternatif') . '</span> <font color=red>*</font></td><td><input type="text" size="33" maxlength="255" name="rep_account" value="' . $rep_account . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Largeur de la vid&#xE9;o') . '</span> </td><td><input type="text" size="33" maxlength="255" name="video_width" value="' . $video_width . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Hauteur de la vid&#xE9;o') . '</span> </td><td><input type="text" size="33" maxlength="255" name="video_height" value="' . $video_height . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Largeur de la vid&#xE9;o dans le bloc') . '</span> </td><td><input type="text" size="33" maxlength="255" name="bloc_width" value="' . $bloc_width . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Hauteur de la vid&#xE9;o dans le bloc') . '</span> </td><td><input type="text" size="33" maxlength="255" name="bloc_height" value="' . $bloc_height . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Nombre de vid&#xE9;o par page') . '</span> <font color=red>*</font> </td><td><input type="text" size="33" maxlength="2" name="incrementby" value="' . $incrementby . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Nombre de vid&#xE9;o dans recherche') . '</span> <font color=red>*</font> </td><td><input type="text" size="33" maxlength="2" name="search_incrementby" value="' . $search_incrementby . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Couleur de fond zone recherche') . '</span> <font color=red>*</font> </td><td><input type="text" size="33" maxlength="6" name="bg_yt_search" value="' . $bg_yt_search . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Classe de style titre') . '</span> </td><td><input type="text" size="33" maxlength="255" name="class_sty_1" value="' . $class_sty_1 . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Classe de style sous-titre') . '</span> </td><td><input type="text" size="33" maxlength="255" name="class_sty_2" value="' . $class_sty_2 . '"></td></tr><tr><td width="25%">
   <span class="' . $class_sty_2 . '">' . video_yt_translate('Classe de style commentaire') . '</span> </td><td><input type="text" size="33" maxlength="255" name="class_sty_3" value="' . $class_sty_3 . '"></td></tr></table>
   <br /><input class="bouton_standard" type="submit" value="' . video_yt_translate('Sauver') . '" />
   <input type="hidden" name="op" value="Extend-Admin-SubModule" />
   <input type="hidden" name="ModPath" value="' . $ModPath . '" />
   <input type="hidden" name="ModStart" value="' . $ModStart . '" />
   <input type="hidden" name="subop" value="SaveSetVideo_yt" />
   </form>';
    closetable();
    closetable();
}
コード例 #14
0
function showcomments($ctype, $cdb, $ccol, $cid, $clink = "")
{
    global $settings, $userdata, $locale;
    include LOCALE . LOCALESET . "comments.php";
    require_once INCLUDES . "bbcode_include.php";
    add_to_head("<script type='text/javascript' src='" . INCLUDES . "comments_include/comments.js'></script>");
    add_to_head("<script type='text/javascript'>\n            var ctype = '" . $ctype . "';\n            if (ctype == 'MG') {\n                var cid = window.cidas;\n            } else {\n                var cid = '" . $cid . "';\n            }\n            var basedir = '" . BASEDIR . "';\n\t\t\tvar locale_noc = '" . $locale['c101'] . "';\n\t\t\tvar locale_edit = '" . $locale['c108'] . "';\n\t\t\tvar locale_del = '" . $locale['c109'] . "';\n    </script>");
    echo "<br /><br />";
    opentable($locale['c100']);
    echo "<div id='comments_load' style='display:none;text-align:center;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;' /></div><div id='comments'></div>";
    closetable();
    echo "<br /><br />";
    opentable($locale['c102']);
    if (iMEMBER) {
        echo "<div align='center'>";
        echo "<a id='edit_comment' name='edit_comment'></a>";
        echo "<form name='comment_form' method='post' action='#'>";
        echo "<input type='hidden' name='comment_name' value='" . $userdata['user_id'] . "' />";
        echo "<input type='hidden' name='cid' value='" . $cid . "' />";
        echo "<input type='hidden' name='ctype' value='" . $ctype . "' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<input type='hidden' name='edited_id' value='' />";
        echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'></textarea><br />";
        echo "<div align='center'>" . display_bbcodes("360px", "comment_message", "comment_form") . "</div>";
        echo "<input type='submit' name='post_comment' value='" . $locale['c102'] . "' class='button' /> ";
        echo "<input type='submit' name='edit_comment' value='" . $locale['c103'] . "' class='button' /> ";
        echo "</form>";
        echo "<div id='comment_load' style='display:none;text-align:center;height:140px;'><img src='" . INCLUDES . "comments_include/load.gif' alt='' style='border:0;margin-top:50px;' /></div>";
        echo "<br />";
        echo "</div>";
    } else {
        echo "<div style='text-align:center'>" . $locale['c105'] . "</div><br />";
    }
    closetable();
    echo "<div style='text-align:center;width:100%;'>AL jQ comments <a href='http://fusion.annetlab.tk'>Fusion @ AnnetLab</a> &copy; 2011-2012</div>";
}
コード例 #15
0
ファイル: authors.php プロジェクト: npds/npds_dune
function error_handler($ibid)
{
    opentable();
    echo "<p class=\"errorhandler\" align=\"center\">" . adm_translate("Merci d'entrer l'information en fonction des spécifications") . "<br /><br />";
    echo "{$ibid}<br /><a href=\"admin.php?op=mod_authors\" class=\"noir\">" . adm_translate("Retour en arrière") . "</a></p>";
    closetable();
}
コード例 #16
0
ファイル: member.inc.php プロジェクト: simplyianm/clububer
function member_steal()
{
    //Steal Money
    global $HTTP_POST_VARS, $userdata, $locale, $settings, $golddata;
    //set an amount in case its missed later
    $success = '20';
    table_top($locale['urg_member_103']);
    /*
    First things first.. Can Only steal from users cash amounts never from bank.
    Lots of things can happen here. If steal is good stuff could happen to stealee
    if steal is bad stuff could happen to stealer.
    Maybe we need a jail now to go with this?
    Fail to steal go to jail and jail means loss of all owned stuff?
    */
    //lets trim the useage of this damn thing
    if ($golddata['steal'] < date('Ymd')) {
        global $stealfrom_id, $stealfrom_name, $steal_amount;
        if (isset($_POST['stealfrom']) != '') {
            //there must be something in the steal from box
            $stealfrom = stripinput($_POST['stealfrom']);
            //its not an numewral so select useing the name
            //sort out the name to id situation
            $id_query = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE user_name = '" . $stealfrom . "'\n\t\t\t\tLIMIT 1");
            //$id_query = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_name='".$stealfrom."' LIMIT 1");
            //$id_result = dbfetch_array($id_query);
            $id_result = dbarray($id_query);
            $stealfrom_id = $id_result['owner_id'];
            $stealfrom_name = $id_result['owner_name'];
            //timer for daily steal only
            $result = dbquery("UPDATE " . DB_UG3 . " SET steal = '" . date('Ymd') . "' WHERE owner_id = '" . $golddata['owner_id'] . "' LIMIT 1");
            $result = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE owner_id = '" . $stealfrom_id . "'\n\t\t\t\tLIMIT 1");
            //$result = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_id='".$stealfrom_id."' LIMIT 1");
            //ok its all so unfair aint it?
            //so lets play a little
            //if the theif has more money than the selected target
            $target_query = dbquery("SELECT g.*, u.user_name as owner_name\n\t\t\t\tFROM " . DB_UG3 . " g\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON g.owner_id = u.user_id\n\t\t\t\tWHERE owner_id = '" . $stealfrom_id . "'\n\t\t\t\tLIMIT 1");
            //$target_query = dbquery("SELECT * FROM ".DB_UG3." WHERE owner_id='".$stealfrom_id."' LIMIT 1");
            //$target_result = dbfetch_array($target_query);
            $target_result = dbarray($target_query);
            $targets_total = $target_result['cash'] + $target_result['bank'];
            if ($targets_total < '100' || $targets_total < '') {
                opentable($locale['urg_member_117']);
                echo $locale['urg_member_118'];
                closetable();
                include "footer.php";
                exit;
            }
            $my_total = $golddata['cash'] + $golddata['bank'];
            if ($targets_total < $my_total) {
                //less than theif
                //set the success percentage low
                $success = '10';
            } elseif ($targets_total > $my_total * 2) {
                //more than double of theif
                //set the success percentage low
                $success = '70';
            } elseif ($targets_total > $my_total / 2) {
                //more than half of theif
                //set the success percentage low
                $success = '45';
            } else {
                $success = '35';
            }
            //get a random number between 0 and 100
            $try = rand(0, 100);
            //percentage probability will work on
            //if successfull
            if ($try < $success) {
                // ??% chance of success
                $stealee = getusergold($stealfrom_id, 'cash');
                $steal_amount = rand(0, $stealee);
                //take this money away from stealee...
                takegold2($stealfrom_id, $steal_amount, 'cash');
                payuser($userdata['user_id'], $steal_amount, 'cash');
                if ($steal_amount < 50) {
                    echo $locale['urg_member_119'] . " " . $steal_amount . "!";
                } else {
                    echo $locale['urg_member_120'] . " " . $steal_amount . " " . $locale['urg_member_121'] . " " . $stealfrom_name . "" . $locale['urg_member_122'] . " " . $stealfrom_name . " " . $locale['urg_member_123'];
                }
            } else {
                if ($golddata['cash'] + $golddata['cash'] <= $steal_amount) {
                    $opt = '2';
                } else {
                    $opt = '4';
                }
                //ok its punishment time..
                $punishment_id = rand(0, $opt);
                //grab a random punishment
                if ($punishment_id == 0) {
                    echo $locale['urg_member_124'];
                } elseif ($punishment_id == 1) {
                    //take karma (must be forced to go negative)
                    takegold2($userdata['user_id'], '10', 'karma', 1);
                    echo $locale['urg_member_125'];
                } elseif ($punishment_id == 2) {
                    //take gold (force it)
                    //$fine = $golddata[cash]/2;
                    $fine_amount = rand(0, $golddata['cash'] + $golddata['bank']);
                    takegold2($userdata['user_id'], $fine_amount, 'cash', 1);
                    echo $locale['urg_member_126'] . formatMoney($fine_amount) . "!<br />";
                } elseif ($punishment_id == 3) {
                    //the stealee robs you
                    //$returnsteal = $golddata['cash']/2;
                    //$returnsteal = $golddata['cash'];
                    $returnsteal = $golddata['cash'] + $golddata['bank'];
                    payuser($stealfrom_id, $returnsteal, 'cash');
                    takegold2($userdata['user_id'], $returnsteal, 'cash', '1');
                    echo $stealfrom_name . $locale['urg_member_128'] . formatMoney($returnsteal) . $locale['urg_member_129'];
                } elseif ($punishment_id == 4) {
                    //the stealee robs you
                    //$returnsteal = $golddata['cash']/2;
                    $returnsteal = $golddata['cash'];
                    payuser($stealfrom_id, $returnsteal, 'cash');
                    takegold2($userdata['user_id'], $returnsteal, 'cash', '1');
                    echo $locale['urg_member_127'] . $stealfrom_name . $locale['urg_member_128'] . formatMoney($returnsteal) . $locale['urg_member_129'];
                } else {
                    echo $locale['urg_member_124'];
                }
            }
        } else {
            echo "<form action='index.php' method='post'>\n";
            echo "<table width='100%' cellpadding='3' cellspacing='3' class='tbl-border'>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_130'] . "</td>\n";
            echo "</tr>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_131'] . "</td>\n";
            echo "</tr>\n<tr valign='top'>\n";
            echo "<td width='100%' colspan='2'><br />" . $locale['urg_member_132'] . "</td>\n";
            echo "</tr>\n<tr class='tbl2'>\n";
            echo "<td><input type='hidden' name='op' value='member_steal' /></td>\n";
            echo "<td>" . $locale['urg_member_133'] . "<input type='text' class='textbox' name='stealfrom' size='50' />\n";
            echo "<a style='cursor:help;' href='javascript:void(window.open(\"findmember.php?title=findmember\",\"\",\"width=350,height=400\"));'>\n";
            echo "<img src='images/find.png' title='" . $locale['urg_member_107'] . "' alt='" . $locale['urg_member_107'] . "' style='border: 0;' />\n";
            echo "</a></td>\n";
            echo "</tr>\n<tr>\n";
            echo "<td colspan='2' align='center'><input class='button' type='submit' value='" . $locale['urg_member_108'] . "' /></td>\n";
            echo "</tr>\n</table>\n";
            echo "</form>";
        }
    } else {
        echo $locale['urg_member_134'];
    }
    closetable();
}
コード例 #17
0
ファイル: stories.php プロジェクト: Jireck-npds/npds_dune
function previewStory($qid, $uid, $author, $subject, $hometext, $bodytext, $topic, $notes, $catid, $ihome, $members, $Mmembers, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur)
{
    global $NPDS_Prefix;
    global $tipath, $hlpfile, $language, $aid, $radminsuper;
    $hlpfile = "manuels/{$language}/newarticle.html";
    $subject = stripslashes(str_replace('"', '&quot;', $subject));
    $hometext = stripslashes($hometext);
    $bodytext = stripslashes($bodytext);
    $notes = stripslashes($notes);
    if ($topic < 1) {
        $topic = 1;
    }
    $affiche = false;
    $result2 = sql_query("SELECT topictext, topicimage, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
    list($topictext, $topicimage, $topicadmin) = sql_fetch_row($result2);
    if ($radminsuper) {
        $affiche = true;
    } else {
        $topicadminX = explode(',', $topicadmin);
        for ($i = 0; $i < count($topicadminX); $i++) {
            if (trim($topicadminX[$i]) == $aid) {
                $affiche = true;
            }
        }
    }
    if (!$affiche) {
        header("location: admin.php?op=submissions");
    }
    $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
    include 'header.php';
    GraphicAdmin($hlpfile);
    global $local_user_language;
    echo '
    <h3>' . adm_translate("Prévisualiser l'Article") . '</h3>
    <form action="admin.php" method="post" name="adminForm">
    
   <label class="form-control-label">' . adm_translate("Langue de Prévisualisation") . '</label> : ' . aff_localzone_langue("local_user_language");
    echo '<div class="card card-block">';
    if ($topicimage !== '') {
        if (!($imgtmp = theme_image('topics/' . $topicimage))) {
            $imgtmp = $tipath . $topicimage;
        }
        $timage = $imgtmp;
        if (file_exists($imgtmp)) {
            $topiclogo = '<img class="img-fluid N_sujetsize" src="' . $timage . '" align="right" alt="" />';
        }
    }
    code_aff('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . meta_lang($hometext) . '</div>', meta_lang($bodytext), meta_lang($notes));
    echo '
    <label class="form-control-label col-sm-4">' . adm_translate("Utilisateur") . '</label>
    <input class="textbox_standard" type="text" name="author" size="50" value="' . $author . '" />
    <label class="form-control-label col-sm-4">' . adm_translate("Titre") . '</label>
    <input class="textbox" type="text" name="subject" size="50" value="' . $subject . '" />
    <label class="form-control-label col-sm-4">' . adm_translate("Sujet") . '</label>
    <select class="c-select form-control" name="topic">';
    $toplist = sql_query("SELECT topicid, topictext, topicadmin FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
    if ($radminsuper) {
        echo '
    <option value="">' . adm_translate("Tous les Sujets") . '</option>';
    }
    while (list($topicid, $topics, $topicadmin) = sql_fetch_row($toplist)) {
        $affiche = false;
        if ($radminsuper) {
            $affiche = true;
        } else {
            $topicadminX = explode(',', $topicadmin);
            for ($i = 0; $i < count($topicadminX); $i++) {
                if (trim($topicadminX[$i]) == $aid) {
                    $affiche = true;
                }
            }
        }
        if ($affiche) {
            if ($topicid == $topic) {
                $sel = 'selected="selected" ';
            }
            echo '
          <option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>';
            $sel = '';
        }
    }
    echo '
    </select>';
    SelectCategory($catid);
    echo '<br />';
    if ($members == 1 and $Mmembers == '') {
        $ihome = "-127";
    }
    if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) {
        $ihome = $Mmembers;
    }
    puthome($ihome);
    closetable2();
    echo '<br /><b>' . adm_translate("Texte d'introduction") . '</b> :<br />
    <textarea class="tin form-control" cols="70" rows="25" name="hometext" >' . $hometext . '</textarea>';
    echo aff_editeur('hometext', '');
    echo '<br /><b>' . adm_translate("Texte étendu") . '</b> :<br />
    <textarea class="tin form-control" cols="70" rows="25" name="bodytext" >' . $bodytext . '</textarea>';
    echo aff_editeur('bodytext', '');
    echo '<br /><b>' . adm_translate("Notes") . '</b> :<br />
    <textarea class="tin form-control" cols="70" rows="7" name="notes" >' . $notes . '</textarea>';
    echo aff_editeur('notes', '');
    publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
    echo '
    <input type="hidden" name="qid" value="' . $qid . '" />
    <input type="hidden" name="uid" value="' . $uid . '" />
    <br /><select class="c-select form-control" name="op">
    <option value="DeleteStory">' . adm_translate(" Effacer l'Article ") . '</option>
    <option value="PreviewAgain" selected="selected">' . adm_translate(" Re-prévisualiser ") . '</option>
    <option value="PostStory">' . adm_translate("Poster un Article ") . '</option>
    </select>
    <input class="btn btn primary" type="submit" value="' . adm_translate("Ok") . '" /></form>';
    closetable();
    include 'footer.php';
}
コード例 #18
0
function settings($stream_config)
{
    if ($stream_config['showplayer'] == 'yes') {
        $option1 = "Да";
        $option2 = "Нет";
        $option3 = "no";
    } else {
        $option1 = "Нет";
        $option2 = "Да";
        $option3 = "yes";
    }
    if ($stream_config['cache_allow'] == 'yes') {
        $option4 = "Да";
        $option5 = "Нет";
        $option6 = "no";
    } else {
        $option4 = "Нет";
        $option5 = "Да";
        $option6 = "yes";
    }
    if ($stream_config['allow_stream'] == 'yes') {
        $option7 = "Да";
        $option8 = "Нет";
        $option9 = "no";
    } else {
        $option7 = "Нет";
        $option8 = "Да";
        $option9 = "yes";
    }
    echomenu();
    opentable();
    tableheader("Настройки модуля");
    echo <<<HTML
<form action="" method="POST">
\t<table width="100%">
\t\t<tbody>
                        <tr>
\t\t\t\t<td style="padding:4px" class="option">
\t\t\t\t\t<div style="padding-bottom:5px;"><b>Включить модуль?</b></div>
\t\t\t\t\t<div class="small">Данная опция позволит показывать стримы на сайте.</div>
\t\t\t\t</td>
\t\t\t\t<td width="400" align="middle">
\t\t\t\t\t<select name="savecfg[allow_stream]">
\t\t\t\t\t\t\t<option value="{$stream_config['allow_stream']}" selected="">{$option7}</option>
\t\t\t\t\t\t\t<option value="{$option9}">{$option8}</option>
\t\t\t\t\t</select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t\t<tr>
\t\t\t\t\t<td background="engine/skins/images/mline.gif" height="1" colspan="2"></td>
\t\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td style="padding:4px" class="option">
\t\t\t\t\t<div style="padding-bottom:5px;"><b>Выводить плеер в краткой информации о трансляции</b></div>
\t\t\t\t\t<div class="small" style="color:red;">Внимание! Использование этой функции нагружает браузер.</div>
\t\t\t\t</td>
\t\t\t\t<td width="400" align="middle">
\t\t\t\t\t<select name="savecfg[showplayer]">
\t\t\t\t\t\t<option value="{$stream_config['showplayer']}" selected="">{$option1}</option>
\t\t\t\t\t\t<option value="{$option3}">{$option2}</option>
\t\t\t\t\t</select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td background="engine/skins/images/mline.gif" height="1" colspan="2"></td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td style="padding:4px" class="option">
\t\t\t\t\t<div style="padding-bottom:5px;"><b>Включить кэширование списка трансляций</b></div>
\t\t\t\t\t<div class="small">Заметно ускоряет вывод списка трансляций.</div>
\t\t\t\t</td>
\t\t\t\t<td width="400" align="middle">
\t\t\t\t\t<select name="savecfg[cache_allow]">
\t\t\t\t\t\t<option value="{$stream_config['cache_allow']}" selected="">{$option4}</option>
\t\t\t\t\t\t<option value="{$option6}">{$option5}</option>
\t\t\t\t\t</select>
\t\t\t\t</td>
\t\t\t</tr>
\t\t\t<tr>
\t\t\t\t<td background="engine/skins/images/mline.gif" height="1" colspan="2"></td>
\t\t\t</tr>
HTML;
    showRow("Время жизни кэша", "В минутах.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[cachelife]\" value=\"{$stream_config['cachelife']}\" size=\"25\">");
    showRow("Количество трансляций в блоке", "Укажите количество трансляций в блоке '{stream-info}'.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[blocklimit]\" value=\"{$stream_config['blocklimit']}\" size=\"25\">");
    showRow("Ширина плеера", "В пикселях.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[width]\" value=\"{$stream_config['width']}\" size=\"25\">");
    showRow("Высота плеера", "В пикселях.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[height]\" value=\"{$stream_config['height']}\" size=\"25\">");
    showRow("Статус онлайн", "Сообщение для вывода статуса.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[online]\" value=\"{$stream_config['online']}\" size=\"25\">");
    showRow("Статус оффлайн", "Сообщение для вывода статуса.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[offline]\" value=\"{$stream_config['offline']}\" size=\"25\">");
    showRow("Заглушка для плеера", "Если трансляция оффлайн, показывается заглушка (используйте BB-коды).", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[zagluska]\" value=\"{$stream_config['zagluska']}\" size=\"25\">");
    showRow("Время жизни кэша", "В минутах", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[cachelife]\" value=\"{$stream_config['cachelife']}\" size=\"25\">");
    showRow("Название(Тайтл) модуля", "Тайтл модуля который будет отображаться в браузере", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[stream_title]\" value=\"{$stream_config['stream_title']}\" size=\"25\">");
    showRow("Описание (Description) модуля", "Краткое описание, не более 200 символов.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[stream_desc]\" value=\"{$stream_config['stream_desc']}\" size=\"25\">");
    showRow("Ключевые слова (Keywords) для модуля", "Введите через запятую основные ключевые слова.", "<input class=\"edit bk\" type=\"text\" style=\"text-align: center;width: 350px;\" name=\"savecfg[stream_keywords]\" value=\"{$stream_config['stream_keywords']}\" size=\"25\">");
    showRow("", "", "<input type=\"hidden\" name=\"action\" value=\"saveconfig\">", false);
    showRow("<input type=\"submit\" class=\"btn btn-success\" value=\"Сохранить настройки\">");
    echo <<<HTML
\t\t</tbody>
\t</table>
</form>
HTML;
    closetable();
}
コード例 #19
0
ファイル: functions.php プロジェクト: knapnet/PHP-Fusion
function render_admin_icon()
{
    global $locale, $admin_icons, $admin_images, $aidlink;
    $admin_title = str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['200']);
    opentable($admin_title);
    echo "<div class='row'>\n";
    if (count($admin_icons['data']) > 0) {
        foreach ($admin_icons['data'] as $i => $data) {
            echo "<div class='icon-wrapper col-xs-6 col-sm-3 col-md-2 col-lg-2'>\n";
            if ($admin_images) {
                echo "<div class='icon-container'>\n";
                echo "<a href='" . $data['admin_link'] . $aidlink . "'><img src='" . get_image("ac_" . $data['admin_rights']) . "' alt='" . $data['admin_title'] . "'/>\n</a>\n";
                echo "<div class='overflow-hide'>\n";
                echo "<a class='icon-title' href='" . $data['admin_link'] . $aidlink . "'>" . $data['admin_title'] . "</a>\n";
                echo "</div>\n";
                echo "</div>\n";
            } else {
                echo "<span class='small'>" . THEME_BULLET . " <a href='" . $data['admin_link'] . $aidlink . "'>" . $data['admin_title'] . "</a></span>";
            }
            echo "</div>\n";
        }
    }
    echo "</div>\n";
    closetable();
}
コード例 #20
0
ファイル: functions2.php プロジェクト: icxbb-xx/eamod
function redir($page, $div, $msg)
{
    opentable("- Informacion -");
    echo "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\">\n\t\t\t\t\t<span style=\"cursor:pointer\" onMouseOver=\"this.style.color='#FF3300'\" onMouseOut=\"this.style.color='#000000'\" onClick=\"return LINK_ajax('{$page}','{$div}')\"><b>" . $msg . "</span>\n\t\t\t\t</tr>\n\t\t\t</td>\n\t\t";
    closetable();
    exit(0);
}
コード例 #21
0
/**
 * @param $comment_type - abbr or short ID
 * @param $comment_db - Current Application DB - DB_BLOG for example.
 * @param $comment_col - current sql primary key column - 'blog_id' for example
 * @param $comment_item_id - current sql primary key value '$_GET['blog_id']' for example
 * @param $clink - current page link 'FUSION_SELF' is ok.
 */
function showcomments($comment_type, $comment_db, $comment_col, $comment_item_id, $clink)
{
    global $settings, $locale, $userdata, $aidlink;
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    $_GET['comment'] = isset($_GET['comment']) && isnum($_GET['comment']) ? $_GET['comment'] : 0;
    $cpp = $settings['comments_per_page'];
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . "\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'"));
        }
        redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&amp;c_start=0"));
    }
    if ($settings['comments_enabled'] == "1") {
        if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) {
            if (!iMEMBER && $settings['guestpost'] == 1) {
                if (!isset($_POST['comment_name'])) {
                    redirect($link);
                }
                if (isnum($_POST['comment_name'])) {
                    $_POST['comment_name'] = '';
                }
                $_CAPTCHA_IS_VALID = FALSE;
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php";
                if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) {
                    redirect($link);
                }
            }
            $comment_data = array('comment_id' => isset($_GET['comment_id']) && isnum($_GET['comment_id']) ? $_GET['comment_id'] : 0, 'comment_name' => iMEMBER ? $userdata['user_id'] : form_sanitizer($_POST['comment_name'], '', 'comment_name'), 'comment_message' => form_sanitizer($_POST['comment_message'], '', 'comment_message'), 'comment_datestamp' => time(), 'comment_item_id' => $comment_item_id, 'comment_type' => $comment_type, 'comment_cat' => 0, 'comment_ip' => USER_IP, 'comment_ip_type' => USER_IP_TYPE, 'comment_hidden' => 0);
            if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && $comment_data['comment_id']) {
                $comment_updated = FALSE;
                if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $comment_data['comment_id'] . "' \n\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tAND comment_type='" . $comment_type . "' \n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "' \n\t\t\t\tAND comment_hidden='0'")) {
                    dbquery_insert(DB_COMMENTS, $comment_data, 'update');
                    if ($comment_data['comment_message']) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_data['comment_message'] . "'\n  \t\t\t\t\t\t\t\t\t   WHERE comment_id='" . $_GET['comment_id'] . "' " . (iADMIN ? "" : "AND comment_name='" . $userdata['user_id'] . "'"));
                        if ($result) {
                            $comment_updated = TRUE;
                        }
                    }
                }
                if ($comment_updated) {
                    if ($settings['comments_sorting'] == "ASC") {
                        $c_operator = "<=";
                    } else {
                        $c_operator = ">=";
                    }
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $comment_data['comment_id'] . "'\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\n\t\t\t\t\t\t\t\tAND comment_type='" . $comment_type . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                }
                redirect($clink . "&amp;c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : ""));
            } else {
                if (!dbcount("(" . $comment_col . ")", $comment_db, $comment_col . "='" . $comment_item_id . "'")) {
                    redirect(BASEDIR . "index.php");
                }
                $id = 0;
                if ($comment_data['comment_name'] && $comment_data['comment_message']) {
                    require_once INCLUDES . "flood_include.php";
                    if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) {
                        dbquery_insert(DB_COMMENTS, $comment_data, 'save');
                        $id = dblastid();
                    }
                }
                if ($settings['comments_sorting'] == "ASC") {
                    $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "'");
                    $c_start = (ceil($c_count / $cpp) - 1) * $cpp;
                } else {
                    $c_start = 0;
                }
                //if (!$settings['site_seo']) {
                redirect($clink . "&amp;c_start=" . $c_start . "#c" . $id);
                //}
            }
        }
        $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE));
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > $cpp) {
            $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\n\t\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\t\tWHERE comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'\n\t\t\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp);
        if (dbrows($result) > 0) {
            $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start'];
            if ($c_rows > $cpp) {
                $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&amp;", "c_start");
            }
            while ($data = dbarray($result)) {
                $c_arr['c_con'][$i]['comment_id'] = $data['comment_id'];
                $c_arr['c_con'][$i]['edit_dell'] = FALSE;
                $c_arr['c_con'][$i]['i'] = $i;
                if ($data['user_name']) {
                    $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status'], 'strong text-dark');
                } else {
                    $c_arr['c_con'][$i]['comment_name'] = $data['comment_name'];
                }
                $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '35px', '', true, 'img-rounded');
                $c_arr['c_con'][$i]['user'] = array('user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_avatar' => $avatar = $data['user_avatar'] !== '' && file_exists(IMAGES . 'avatars/' . $data['user_avatar']) ? IMAGES . 'avatars/' . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png", 'user_status' => $data['user_status']);
                $c_arr['c_con'][$i]['comment_datestamp'] = showdate('shortdate', $data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_time'] = timer($data['comment_datestamp']);
                $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message'])));
                if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    $edit_link = clean_request('c_action=edit&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false) . "#edit_comment";
                    $delete_link = clean_request('c_action=delete&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false);
                    $c_arr['c_con'][$i]['edit_link'] = array('link' => $edit_link, 'name' => $locale['c108']);
                    $c_arr['c_con'][$i]['delete_link'] = array('link' => $delete_link, 'name' => $locale['c109']);
                    $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<div class='btn-group'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $edit_link . "'>";
                    $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a>\n";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $delete_link . "' onclick=\"return confirm('" . $locale['c110'] . "');\">";
                    $c_arr['c_con'][$i]['edit_dell'] .= "<i class='fa fa-trash'></i> " . $locale['c109'] . "</a>";
                    $c_arr['c_con'][$i]['edit_dell'] .= "</div>\n";
                }
                $settings['comments_sorting'] == "ASC" ? $i++ : $i--;
            }
            if (iADMIN && checkrights("C")) {
                $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n";
                $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype=" . $comment_type . "&amp;comment_item_id=" . $comment_item_id . "'>" . $locale['c106'] . "</a>";
            }
        }
        opentable($locale['c102']);
        $comment_message = "";
        if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
            $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $comment_item_id . "'\n\t\t\t\tAND comment_type='" . $comment_type . "' AND comment_hidden='0'");
            if (dbrows($eresult) > 0) {
                $edata = dbarray($eresult);
                if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;comment_id=" . $edata['comment_id'];
                    $comment_message = $edata['comment_message'];
                }
            } else {
                $comment_message = "";
            }
        }
        if (iMEMBER || $settings['guestposts'] == "1") {
            require_once INCLUDES . "bbcode_include.php";
            echo "<a id='edit_comment' name='edit_comment'></a>\n";
            echo openform('inputform', 'post', $clink, array('class' => 'm-b-20', 'max_tokens' => 1));
            if (iGUEST) {
                echo form_text('comment_name', $locale['c104'], '', array('max_length' => 30));
            }
            echo form_textarea('comment_message', '', $comment_message, array('required' => 1, 'autosize' => 1, 'form_name' => 'inputform', 'bbcode' => 1));
            if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) {
                $_CAPTCHA_HIDE_INPUT = FALSE;
                echo "<div style='width:360px; margin:10px auto;'>";
                echo $locale['global_150'] . "<br />\n";
                include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php";
                if (!$_CAPTCHA_HIDE_INPUT) {
                    echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>";
                    echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n";
                }
                echo "</div>\n";
            }
            echo form_button('post_comment', $comment_message ? $locale['c103'] : $locale['c102'], $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn-success m-t-10'));
            echo closeform();
        } else {
            echo "<div class='well'>\n";
            echo $locale['c105'] . "\n";
            echo "</div>\n";
        }
        closetable();
        echo "<a id='comments' name='comments'></a>";
        render_comments($c_arr['c_con'], $c_arr['c_info']);
    }
}
コード例 #22
0
ファイル: custom_news.php プロジェクト: php-fusion/PHP-Fusion
    /**
     * News Item Page Template
     * @param $info
     */
    function render_news_item($info)
    {
        global $aidlink;
        $locale = fusion_get_locale();
        $news_settings = get_settings('news');
        $data = $info['news_item'];
        add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>");
        add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
        add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
        add_to_footer('<script type="text/javascript">
			$(document).ready(function() {
				$(".news-image-overlay").colorbox({
					transition: "elasic",
					height:"100%",
					width:"100%",
					maxWidth:"98%",
					maxHeight:"98%",
					scrolling:false,
					overlayClose:true,
					close:false,
					photo:true,
					onComplete: function(result) {
						$("#colorbox").live("click", function(){
						$(this).unbind("click");
						$.fn.colorbox.close();
						});
					},
					onLoad: function () {
					}
			   });
			});
			</script>');
        opentable($locale['news_0004']);
        echo render_breadcrumbs();
        echo "<!--news_pre_readmore-->";
        echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n";
        echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n";
        echo "<div class='news_news text-dark m-t-20 m-b-20'>\n";
        if ($data['news_image_src']) {
            echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n            <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>";
        } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) {
            echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n            <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n            </a>";
        }
        echo $data['news_news'];
        echo "</div>\n";
        echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n";
        echo "<div style='clear:both;'></div>\n";
        echo "<div class='well m-t-5 text-center'>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n";
        echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n";
        echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>";
        echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : '';
        echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : '';
        echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&amp;item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>";
        echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&amp;action=edit&amp;section=news_form&amp;news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : "";
        echo "</div>";
        echo "<!--news_sub_readmore-->";
        echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : "";
        if ($data['page_count'] > 0) {
            echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&amp;") . "\n</div>\n";
        }
        if ($data['news_allow_comments']) {
            echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        if ($data['news_allow_ratings']) {
            echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
        }
        echo "</article>\n";
        closetable();
    }
コード例 #23
0
ファイル: profile.php プロジェクト: php-fusion/PHP-Fusion
    function render_userprofile($info)
    {
        // Basic User Information
        $basic_info = isset($info['core_field']) && is_array($info['core_field']) ? $info['core_field'] : array();
        //User Fields Module Information
        $field_info = isset($info['user_field']) && is_array($info['user_field']) ? $info['user_field'] : array();
        $user_info = '';
        $user_avatar = '';
        $user_name = '';
        $user_level = '';
        foreach ($basic_info as $field_id => $data) {
            if ($field_id == 'profile_user_avatar') {
                $avatar['user_avatar'] = $data['value'];
                $avatar['user_status'] = $data['status'];
                $user_avatar = "<img src='" . $data['value'] . "' style='width:50px;' alt='" . $info['core_field']['profile_user_name']['value'] . "'/>\n";
            } elseif ($field_id == 'profile_user_name') {
                $user_name = "<h4>" . $data['value'] . "</h4>\n";
            } elseif ($field_id == 'profile_user_level') {
                $user_info .= "\n\t\t\t\t<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $data['title'] . "</span>\n\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text overflow-hide'>" . $data['value'] . "</div>\n\t\t\t\t</div>\n";
            } else {
                $user_info .= !empty($data['value']) ? "\n\t\t\t\t\t<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $data['title'] . "</span>\n\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text'>" . $data['value'] . "</div>\n\t\t\t\t\t</div>\n" : '';
            }
        }
        if (!empty($field_info)) {
            $user_field = '';
            foreach ($field_info as $field_cat_id => $category_data) {
                if (!empty($category_data['fields'])) {
                    $user_field .= $category_data['title'];
                    $user_field .= "<div class='list-group-item'>";
                    if (isset($category_data['fields'])) {
                        foreach ($category_data['fields'] as $field_id => $field_data) {
                            $user_field .= "<div id='" . $field_id . "' class='m-b-5 row'>\n\t\t\t\t\t\t<span class='col-xs-12 col-sm-3'>" . $field_data['title'] . "</span>\n\t\t\t\t\t\t<div class='col-xs-12 col-sm-9 profile_text'>" . $field_data['value'] . "</div>\n\t\t\t\t\t\t</div>\n";
                        }
                    }
                    $user_field .= "</div>\n";
                }
            }
        } else {
            global $locale;
            $user_field = "<div class='m-t-20 text-center well'>" . $locale['uf_108'] . "</div>\n";
        }
        // buttons
        $user_buttons = '';
        if (!empty($info['buttons'])) {
            $user_buttons = "<div class='btn-group m-t-10 m-b-10 col-sm-offset-3'>";
            foreach ($info['buttons'] as $buttons) {
                $user_buttons .= "<a class='btn btn-sm button btn-default' href='" . $buttons['link'] . "'>" . $buttons['name'] . "</a>";
            }
            $user_buttons .= "</div>\n";
        }
        global $locale;
        opentable($locale['u104'] . " " . $user_name);
        ?>
		<!--userprofile_pre_idx-->
		<section id='user-profile' class='m-t-20'>
			<?php 
        if (!empty($info['section'])) {
            $tab_title = array();
            foreach ($info['section'] as $page_section) {
                $tab_title['title'][$page_section['id']] = $page_section['name'];
                $tab_title['id'][$page_section['id']] = $page_section['id'];
                $tab_title['icon'][$page_section['id']] = "";
            }
            echo opentab($tab_title, $_GET['section'], "profile_tab", TRUE);
        }
        ?>
            <div class='clearfix m-t-20'>
                <div class='pull-left m-r-20'><?php 
        echo $user_avatar;
        ?>
</div>
                <div class='overflow-hide'>
                    <?php 
        echo $user_name;
        echo $user_level;
        echo $user_info;
        echo $user_buttons;
        echo $user_field;
        echo "<hr />";
        if (!empty($info['admin'])) {
            echo $info['admin'];
        }
        ?>
                </div>
            </div>
            <?php 
        echo closetab();
        ?>
		</section>
		<!--userprofile_sub_idx-->
	<?php 
        closetable();
    }
コード例 #24
0
ファイル: inventry.php プロジェクト: simplyianm/clububer
function admineditmoney()
{
    // Saves the changes done to the users account by admin
    global $userdata, $locale, $aidlink;
    $userid = stripinput($_POST['userid']);
    $username = stripinput($_POST['username']);
    $money_pocket = stripinput($_POST['money_pocket']);
    $money_bank = stripinput($_POST['money_bank']);
    $chips = stripinput($_POST['chips']);
    $karma = stripinput($_POST['karma']);
    $ribbon = stripinput($_POST['ribbon']);
    opentable($locale['urg_a_inventry_100'], '');
    echo "<div align='center'>\n";
    $context['shop_inventory_search'] = 2;
    $result = dbquery("UPDATE " . DB_UG3 . " SET cash = '" . $money_pocket . "', bank = '" . $money_bank . "', chips = '" . $chips . "', karma = '" . $karma . "', ribbon = '" . $ribbon . "' WHERE owner_id = '" . $userid . "' LIMIT 1");
    echo sprintf($locale['urg_a_inventry_124'], $username, $money_pocket, $money_bank, $chips, $karma, $ribbon);
    echo "<form action='index.php" . $aidlink . "&amp;op=viewmember' method='post'>\n";
    echo "<input name='searchfor' class='textbox' type='hidden' value='" . $username . "' />\n";
    echo "<input type='submit' class='button' value='" . $locale['urg_a_inventry_125'] . "' />\n";
    echo "</form>\n";
    $subject = $locale['urg_a_inventry_126'];
    $message = sprintf($locale['urg_a_inventry_127'], $userdata['user_name'], $money_pocket, $money_bank, $chips, $karma, $ribbon);
    sendpm($userid, $subject, $message, ${$userdata}['user_id'], $userdata['user_name']);
    echo "</div>\n";
    closetable();
}
コード例 #25
0
ファイル: donate.inc.php プロジェクト: simplyianm/clububer
function donate_self_donate()
{
    global $userdata, $locale, $golddata;
    table_top($locale['urg_donate_128']);
    echo "<table width='100%' cellpadding='5' cellspacing='0' border='0'>\n<tr valign='top'>\n";
    echo "<td style='width: 100%'>";
    $allgold = $golddata['cash'] + $golddata['bank'];
    if ($allgold <= UGLD_SELFDONATE_ALLOW) {
        $autodonate = rand(UGLD_SELFDONATE_MIN, UGLD_SELFDONATE_MAX);
        payuser($userdata['user_id'], $autodonate, 'cash');
        echo sprintf($locale['urg_donate_129'], formatMoney($autodonate));
        pagerefresh('meta', '2', FUSION_SELF . '?op=start');
    } else {
        echo sprintf($locale['urg_donate_130'], formatMoney(UGLD_SELFDONATE_ALLOW), formatMoney($allgold));
        pagerefresh('meta', '2', FUSION_SELF . '?op=start');
    }
    echo "</td>\n";
    echo "</tr>\n</table>\n";
    closetable();
}
コード例 #26
0
ファイル: sections.php プロジェクト: Jireck-npds/npds_dune
function publishrights($author)
{
    global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
    if ($radminsuper != 1) {
        Header("Location: admin.php?op=sections");
    }
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Droits des auteurs") . ' :: ' . $author . '</h3>
   <form action="admin.php" method="post">';
    include_once "lib/togglediv.class.php";
    $result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre");
    $numrow = sql_num_rows($result1);
    $toggle = new ToggleDiv($numrow);
    echo $toggle->All();
    echo "<hr noshade=\"noshade\" class=\"ongl\" />";
    $i = 0;
    while (list($rubid, $rubname) = sql_fetch_row($result1)) {
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\">\n            <tr>\n            <td class=\"header\" width=\"40%\">";
        echo $toggle->Img();
        echo aff_langue($rubname) . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Créer") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Publier") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Modifier") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Supprimer") . "</td>\n            </tr></table>";
        echo $toggle->Begin();
        $result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre");
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\">";
        $rowcolor = tablos();
        while (list($secid, $secname) = sql_fetch_row($result2)) {
            $result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$author}'");
            $i++;
            $crea = "";
            $publi = "";
            $modif = "";
            $supp = "";
            if (sql_num_rows($result3) > 0) {
                while (list($type) = sql_fetch_row($result3)) {
                    if ($type == 1) {
                        $crea = "checked=\"checked\"";
                    } else {
                        if ($type == 2) {
                            $publi = "checked=\"checked\"";
                        } else {
                            if ($type == 3) {
                                $modif = "checked=\"checked\"";
                            } else {
                                if ($type == 4) {
                                    $supp = "checked=\"checked\"";
                                }
                            }
                        }
                    }
                }
            }
            echo "<tr>\n               <td width=\"40%\">" . aff_langue($secname) . "</td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"creation[{$i}]\" value=\"{$secid}\" {$crea} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"publication[{$i}]\" value=\"{$secid}\" {$publi} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"modification[{$i}]\" value=\"{$secid}\" {$modif} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"suppression[{$i}]\" value=\"{$secid}\" {$supp} /></td>\n               </tr>";
        }
        echo '</table>';
        echo $toggle->End();
        echo '<br />';
    }
    echo '<input type="hidden" name="chng_aid" value="' . $author . '" />
         <input type="hidden" name="op" value="updatedroitauteurs" />
         <input type="hidden" name="maxindex" value="' . $i . '" />
         <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />&nbsp;&nbsp;
         <input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" />
         </form>';
    closetable();
    include "footer.php";
}
コード例 #27
0
ファイル: suspend_include.php プロジェクト: dioda/phpfusion
function display_suspend_log($user_id, $type = "all", $rowstart = 0, $limit = 0)
{
    global $locale;
    $db_type = $type != "all" && isnum($type) ? " AND suspend_type='{$type}'" : "";
    $rows = dbcount("(suspend_id)", DB_SUSPENDS, "suspended_user='******'{$db_type}");
    $result = dbquery("SELECT sp.suspend_id, sp.suspend_ip, sp.suspend_ip_type, sp.suspend_date, sp.suspend_reason,\n\t\tsp.suspend_type, sp.reinstate_date, sp.reinstate_reason, sp.reinstate_ip, sp.reinstate_ip_type,\n\t\ta.user_name AS admin_name, b.user_name AS admin_name_b \n\t\tFROM " . DB_SUSPENDS . " sp \n\t\tLEFT JOIN " . DB_USERS . " a ON sp.suspending_admin=a.user_id \n\t\tLEFT JOIN " . DB_USERS . " b ON sp.reinstating_admin=b.user_id \n\t\tWHERE suspended_user='******'{$db_type}\n\t\tORDER BY suspend_date DESC" . ($limit > 0 ? " LIMIT {$limit}" : ""));
    $rows = dbrows($result);
    $udata = dbarray(dbquery("SELECT user_name FROM " . DB_USERS . " WHERE user_id='{$user_id}' LIMIT 1"));
    if ($type == "all") {
        opentable(sprintf($locale['susp100'], $udata['user_name']));
        member_nav(member_url("view", $user_id) . "|" . $udata['user_name'], member_url("log", $user_id) . "|" . $locale['susp114']);
    } else {
        opentable(sprintf($locale['susp100b'], getsuspension($type, true), $udata['user_name']));
    }
    if ($rows) {
        echo "<table width='80%' cellpadding='1' cellspacing='0' class='tbl-border center'>\n<tr>\n";
        if ($type == "all") {
            $description = sprintf($locale['susp101'], $udata['user_name']);
        } else {
            $description = sprintf($locale['susp102'], getsuspension($type), $udata['user_name']);
        }
        echo "<td class='tbl2' width='30'>" . $locale['susp103'] . "</td>\n";
        echo "<td class='tbl2' width='120'>" . $locale['susp104'] . "</td>\n";
        echo "<td class='tbl2' width='250'>" . $locale['susp105'] . "</td>\n";
        echo "<td class='tbl2' width='150'>" . $locale['susp106'] . "</td>\n";
        echo "</tr>\n";
        $i = 1;
        while ($data = dbarray($result)) {
            $class = "tbl{$i}";
            $suspension = $data['suspend_type'] != 2 ? getsuspension($data['suspend_type']) : $locale['susp111'];
            $reason = $data['suspend_reason'] ? ": " . $data['suspend_reason'] : "";
            $admin = $data['admin_name'] ? $data['admin_name'] . " (" . $locale['susp108'] . ": " . $data['suspend_ip'] . ")" : $locale['susp109'];
            echo "<tr><td class='{$class}' valign='top'>#" . $data['suspend_id'] . "</td>\n";
            echo "<td class='{$class}' valign='top'>" . showdate('forumdate', $data['suspend_date']) . "</td>\n";
            echo "<td class='{$class}' valign='top'><strong>{$suspension}</strong>{$reason}</td>\n";
            echo "<td class='{$class}' valign='top'>{$admin}</td>\n";
            echo "</tr>\n<tr>\n";
            if ($data['reinstate_date']) {
                $r_reason = $data['reinstate_reason'] ? ": " . $data['reinstate_reason'] : "";
                $admin = $data['admin_name_b'] ? $data['admin_name_b'] . " (" . $locale['susp112'] . $data['reinstate_ip'] . ")" : $locale['susp109'];
                echo "<td class='{$class}' valign='top' align='right'>&nbsp;</td>\n";
                echo "<td class='{$class}' valign='top'>" . showdate('forumdate', $data['reinstate_date']) . "</td>\n";
                echo "<td class='{$class}' valign='top'>" . $locale['susp113'] . $r_reason . "</td>\n";
                echo "<td class='{$class}' valign='top'>{$admin}</td>\n";
                echo "</tr>\n<tr>\n";
            } elseif ($data['suspend_type'] != 2) {
                echo "<td class='{$class}' valign='top' align='right'>&nbsp;</td>\n";
                echo "<td class='{$class}' valign='top'>&nbsp;</td>\n";
                echo "<td class='{$class}' valign='top'>&nbsp;</td>\n";
                echo "<td class='{$class}' valign='top'>&nbsp;</td>\n";
                echo "</tr>\n<tr>\n";
            }
            echo "<td class='tbl1' colspan='4'><hr /></td>\n";
            echo "</tr>\n";
            if ($i == 2 ? $i = 1 : $i++) {
            }
        }
        echo "</table>\n";
    } else {
        echo "<div id='close-message'><div class='admin-message'>" . $locale['susp110'] . "</div></div>\n";
    }
    closetable();
}
コード例 #28
0
ファイル: functions.php プロジェクト: Jireck-npds/npds_dune
function forumerror($e_code)
{
    global $sitename, $header;
    if ($e_code == "0001") {
        $error_msg = translate("Could not connect to the forums database.");
    }
    if ($e_code == "0002") {
        $error_msg = translate("The forum you selected does not exist. Please go back and try again.");
    }
    if ($e_code == "0004") {
        $error_msg = translate("Could not query the topics database.");
    }
    if ($e_code == "0005") {
        $error_msg = translate("Error getting messages from the database.");
    }
    if ($e_code == "0006") {
        $error_msg = translate("Please enter the Nickname and the Password.");
    }
    if ($e_code == "0007") {
        $error_msg = translate("You are not the Moderator of this forum therefore you can't perform this function.");
    }
    if ($e_code == "0008") {
        $error_msg = translate("You did not enter the correct password, please go back and try again.");
    }
    if ($e_code == "0009") {
        $error_msg = translate("Could not remove posts from the database.");
    }
    if ($e_code == "0010") {
        $error_msg = translate("Could not move selected topic to selected forum. Please go back and try again.");
    }
    if ($e_code == "0011") {
        $error_msg = translate("Could not lock the selected topic. Please go back and try again.");
    }
    if ($e_code == "0012") {
        $error_msg = translate("Could not unlock the selected topic. Please go back and try again.");
    }
    if ($e_code == "0013") {
        $error_msg = translate("Could not query the database.") . "<br />Error: sql_error()";
    }
    if ($e_code == "0014") {
        $error_msg = translate("No such user or post in the database.");
    }
    if ($e_code == "0015") {
        $error_msg = translate("Search Engine was unable to query the forums database.");
    }
    if ($e_code == "0016") {
        $error_msg = translate("That user does not exist. Please go back and search again.");
    }
    if ($e_code == "0017") {
        $error_msg = translate("You must type a subject to post. You can't post an empty subject. Go back and enter the subject");
    }
    if ($e_code == "0018") {
        $error_msg = translate("You must choose message icon to post. Go back and choose message icon.");
    }
    if ($e_code == "0019") {
        $error_msg = translate("You must type a message to post. You can't post an empty message. Go back and enter a message.");
    }
    if ($e_code == "0020") {
        $error_msg = translate("Could not enter data into the database. Please go back and try again.");
    }
    if ($e_code == "0021") {
        $error_msg = translate("Can't delete the selected message.");
    }
    if ($e_code == "0022") {
        $error_msg = translate("An error ocurred while querying the database.");
    }
    if ($e_code == "0023") {
        $error_msg = translate("Selected message was not found in the forum database.");
    }
    if ($e_code == "0024") {
        $error_msg = translate("You can't reply to that message. It wasn't sent to you.");
    }
    if ($e_code == "0025") {
        $error_msg = translate("You can't post a reply to this topic, it has been locked. Contact the administrator if you have any question.");
    }
    if ($e_code == "0026") {
        $error_msg = translate("The forum or topic you are attempting to post to does not exist. Please try again.");
    }
    if ($e_code == "0027") {
        $error_msg = translate("You must enter your username and password. Go back and do so.");
    }
    if ($e_code == "0028") {
        $error_msg = translate("You have entered an incorrect password. Go back and try again.");
    }
    if ($e_code == "0029") {
        $error_msg = translate("Couldn't update post count.");
    }
    if ($e_code == "0030") {
        $error_msg = translate("The forum you are attempting to post to does not exist. Please try again.");
    }
    if ($e_code == "0031") {
        return 0;
    }
    if ($e_code == "0035") {
        $error_msg = translate("You can't edit a post that's not yours.");
    }
    if ($e_code == "0036") {
        $error_msg = translate("You do not have permission to edit this post.");
    }
    if ($e_code == "0037") {
        $error_msg = translate("You did not supply the correct password or do not have permission to edit this post. Please go back and try again.");
    }
    if ($e_code == "0101") {
        $error_msg = translate("You can't reply to that message.");
    }
    if (!isset($header)) {
        include "header.php";
    }
    opentable();
    echo "<p align=\"center\"><b>{$sitename} " . translate("Forum Error") . "</b><br /><br />";
    echo translate("Error Code:") . " {$e_code}<br /><br />";
    echo "{$error_msg}<br /><br />";
    echo "[ <a href=\"javascript:history.go(-1)\" class=\"noir\">" . translate("Go Back") . "</a> ]<br /></p>";
    closetable();
    include "footer.php";
    die("");
}
コード例 #29
0
ファイル: articles.php プロジェクト: WuChEn/PHP-Fusion
                if ($settings['comments_enabled'] == "0" && $settings['ratings_enabled'] == "0") {
                    $sys = $locale['459'];
                } elseif ($settings['comments_enabled'] == "0") {
                    $sys = $locale['457'];
                } else {
                    $sys = $locale['458'];
                }
                echo "<tr>\n<td colspan='2' class='tbl1' style='font-weight:bold;text-align:left; color:black !important; background-color:#FFDBDB;'>";
                echo "<span style='color:red;font-weight:bold;margin-right:5px;'>*</span>" . sprintf($locale['456'], $sys);
                echo "</td>\n</tr>";
            }
            echo "<tr>\n";
            echo "<td align='center' colspan='2' class='tbl'><br />\n";
            if (isset($_POST['article_id']) && isnum($_POST['article_id']) || isset($_GET['article_id']) && isnum($_GET['article_id'])) {
                echo form_hidden('', 'article_id', 'article_id', isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id']);
                //echo "<input type='hidden' name='article_id' value='".(isset($_POST['article_id']) ? $_POST['article_id'] : $_GET['article_id'])."' />\n";
            }
            echo form_button($locale['430'], 'preview', 'preview', $locale['430'], array('class' => 'btn-primary m-r-10'));
            echo form_button($locale['431'], 'save', 'save', $locale['431'], array('class' => 'btn-primary'));
            echo "</tr>\n</table>\n</form>\n";
            closetable();
            add_to_jquery("\r\n            function DeleteArticle() { return confirm('" . $locale['451'] . "');}\r\n            \$('#save, #preview').bind('click', function(e) {\r\n            var subject = \$('#subject').val();\r\n            if (subject == '') { alert('" . $locale['450'] . "'); return false; }\r\n            });\r\n            ");
        }
    }
} else {
    opentable($locale['403']);
    echo "<div style='text-align:center'>" . $locale['452'] . "<br />\n" . $locale['453'] . "<br />\n";
    echo "<a href='article_cats.php" . $aidlink . "'>" . $locale['454'] . "</a>" . $locale['455'] . "</div>\n";
    closetable();
}
require_once THEMES . "templates/footer.php";
コード例 #30
0
ファイル: shop.inc.php プロジェクト: simplyianm/clububer
function shop_karma()
{
    //Karma
    global $HTTP_POST_VARS, $userdata, $locale, $settings, $golddata;
    /*
    Ok I have heard of karma and someone said its good thing so i figured i would add it here.
    The trouble is i dont really know what it can be used for.
    So i was thinking this could be a post reward thing as well as something you buy.
    anyways since i am not sure for now i havent done much but setup ready for queries etc.
    */
    table_top($locale['urg_shop_155']);
    //<input type='text' name='karmaup' value='5'>
    //$result = dbquery("UPDATE ".DB_PREFIX."user_gold SET karma = karma + ".$_POST['karmaup']." WHERE owner_id = '".$userdata[user_id]."'");
    echo $locale['urg_shop_155'];
    //echo $locale['URG1508'].$_POST['karmaup']."!";
    closetable();
}