Example #1
0
function ajout_forum_form($map_cat)
{
    $list_rank = list_db('guild_list_rank', array('Guild_ID' => user_data('Account_Guild_ID')));
    foreach ($list_rank as $l) {
        $values[$l['Rank_ID']] = $l['Rank_Name'];
    }
    set_values_db("Caranille_Forums", "Auth_View", $values);
    set_values_db("Caranille_Forums", "Auth_Post", $values);
    set_values_db("Caranille_Forums", "Auth_Topic", $values);
    set_values_db("Caranille_Forums", "Auth_Annonce", $values);
    set_values_db("Caranille_Forums", "Auth_Modo", $values);
    if (has_guild_acces('forum')) {
        $form = '<form method="POST" action="' . get_link("Main", "Guild") . '">';
        $form .= '<h2>Ajout de Forum</h2>';
        $form .= '<input type="hidden" name="Forum_Guild_ID" value="' . user_data('Account_Guild_ID') . '"/>';
        $form .= '<table style="width:100%">';
        $form .= '<tr>';
        $form .= '<td style="width:50%">';
        $form .= line_db("Caranille_Forums", "Forum_Name");
        $form .= 'Catégorie : <select name="Forum_Cat_ID">';
        foreach ($map_cat as $ID => $nom) {
            $form .= '<option value="' . $ID . '">' . $nom . '</option>';
        }
        $form .= '</select>';
        $form .= line_db("Caranille_Forums", "Auth_View");
        $form .= line_db("Caranille_Forums", "Auth_Post");
        $form .= line_db("Caranille_Forums", "Auth_Topic");
        $form .= line_db("Caranille_Forums", "Auth_Annonce");
        $form .= line_db("Caranille_Forums", "Auth_Modo");
        $form .= '</td>';
        $form .= '<td style="width:50%">' . call_bbcode_editor("Forum_Desc", "", "guild-forum") . '</td>';
        $form .= '</tr>';
        $form .= '<tr>';
        $form .= '<td><input type="submit" name="End_Add_Forum" value="Terminer"/></td>';
        $form .= '</tr>';
        $form .= '</table>';
        $form .= '</form>';
        return $form;
    }
}
Example #2
0
<?php

if (verif_connect()) {
    load_css('guild.css', 'guild');
    if (has_guild()) {
        if (has_guild_acces('recrutement')) {
            if (request_confirm('guild-engage') || request_confirm('guild-refuse')) {
                if (verifier_token(60, get_link('Recrutement', 'Guild'), 'guild-candidat-' . $_POST['Account_ID'])) {
                    $Account_Query = get_db("candidat_guild_confirm", array('Guild_ID' => guild_data('Guild_ID'), 'Account_ID' => request_post('Account_ID')));
                    if (!empty($Account_Query)) {
                        if (request_confirm('guild-engage')) {
                            update_db('Caranille_Accounts', stripslashes_r($_POST));
                            $message = "Vous avez été accepté dans la guilde " . guild_data('Guild_Name') . ".";
                        } else {
                            update_db('Caranille_Accounts', array('Account_ID' => $Account_Query['Account_ID'], 'Account_Guild_ID' => 0, 'Account_Guild_Accept' => 0));
                            $message = "Votre candidature dans la guilde " . guild_data('Guild_Name') . " a été refusé.";
                        }
                        add_diary($message, $Account_Query['Account_ID']);
                        insert_db('Caranille_Private_Messages', array('Private_Message_Transmitter' => logged_data('Account_ID'), 'Private_Message_Receiver' => $Account_Query['Account_Pseudo'], 'Private_Message_Subject' => "Votre candidature dans la guilde " . guild_data('Guild_Name'), 'Private_Message_Message' => $message, 'Private_Message_Conversation' => null));
                    }
                }
            }
        }
    }
}
Example #3
0
         $content .= '<table style="width:100%">';
         $content .= '<tr><td>';
         $content .= line_db("Caranille_Events", "Event_Name", $events[$day]['Event_Name']);
         $content .= call_bbcode_editor("Event_Description", $events[$day]['Event_Description']);
         //line_db("Caranille_Events","Event_Description",$events[$day]['Event_Description']);
         $content .= '</td></tr>';
         $content .= '</table>';
         $content .= '<input type="submit" name="End_Edit_Event" value="Terminer"/>';
         $content .= '</form>';
     } else {
         $content = '<h4>' . $events[$day]['Event_Name'] . '</h4>';
         $content .= '<p>' . $events[$day]['Event_Description'] . '</p>';
     }
     echo init_popIn('event-' . $events[$day]['Event_ID'] . '-form', "Ev: " . $events[$day]['Event_Name'], $content, 'event-link');
 } else {
     if (has_guild_acces('evenement')) {
         $content = '<form method="POST" action="' . get_link("Calendar", "Guild", array('m' => $month, 'y' => $year)) . '">';
         $content .= '<input type="hidden" name="Event_Guild_ID" value="' . user_data('Account_Guild_ID') . '"/>';
         $content .= '<input type="hidden" name="Event_Date" value="' . "{$year}-{$month}-{$day}" . '"/>';
         $content .= '<table style="width:100%">';
         $content .= '<tr><td>';
         $content .= line_db("Caranille_Events", "Event_Name");
         $content .= call_bbcode_editor("Event_Description");
         //line_db("Caranille_Events","Event_Description");
         $content .= '</td></tr>';
         $content .= '</table>';
         $content .= '<input type="submit" name="End_Add_Event" value="Terminer"/>';
         $content .= '</form>';
         echo init_popIn('event-' . $day . '-form', "Nouvel Evenement", $content, 'event-link');
     }
 }
Example #4
0
<?php

// l'utilisateur peut ajouter un titre pour chaque module different de Caranille -Accueil
//$title ="";
//$baseline= ""
if (verif_connect()) {
    //Si l'utilisateur ne possède pas de Guilde
    if (has_guild()) {
        load_css('guild.css', 'guild');
        if (has_guild_acces('message')) {
            if (request_confirm('send-message')) {
                if (verifier_token(60, get_link('Message', 'Guild'), 'guild-message')) {
                    update_db('Caranille_Guilds', addslashes_r($_POST));
                    echo "Message mis à jour";
                }
            }
        }
    }
}
Example #5
0
 function menu_guild()
 {
     global $already_call_menu_guild;
     // Guilde - Offrande - Forum - Membres - Chat - Message - Grades - Recrutement -
     if (!$already_call_menu_guild) {
         echo "\n\t\t\t<div class='city-menu'>\n\t\t\t\t<a href='" . get_Link('Guild', 'Guild') . "'>" . LanguageValidation::nMsg('menu.guild') . "</a>" . LanguageValidation::eMsg('menu.guild') . " -\n\t\t\t\t<a href='" . get_Link('Gift', 'Guild') . "'>" . LanguageValidation::nMsg('menu.gift') . "</a>" . LanguageValidation::eMsg('menu.gift') . " -";
         if (verif_guild(true)) {
             echo "\n\t\t\t\t\t<a href='" . get_Link('Main', 'Guild') . "'>" . LanguageValidation::nMsg('menu.forum') . "</a>" . LanguageValidation::eMsg('menu.forum') . " -\n\t\t\t\t\t<a href='" . get_Link('Membres', 'Guild') . "'>" . LanguageValidation::nMsg('menu.members') . "</a>" . LanguageValidation::eMsg('menu.members') . " -\n\t\t\t\t\t<!--<a href='" . get_Link('Chat', 'Guild') . "'>" . LanguageValidation::nMsg('menu.chat') . "</a>" . LanguageValidation::eMsg('menu.chat') . " -->\n\t\t\t\t";
             if (has_guild_acces('message')) {
                 echo "<a href='" . get_Link('Message', 'Guild') . "'>" . LanguageValidation::nMsg('menu.message') . "</a>" . LanguageValidation::eMsg('menu.message') . " -";
             }
             if (has_guild_acces('rank')) {
                 echo "<a href='" . get_Link('Rank', 'Guild') . "'>" . LanguageValidation::nMsg('menu.rank') . "</a>" . LanguageValidation::eMsg('menu.rank') . " -";
             }
             if (has_guild_acces('recrutement')) {
                 echo "<a href='" . get_Link('Recrutement', 'Guild') . "'>" . LanguageValidation::nMsg('menu.recrutement') . "</a>" . LanguageValidation::eMsg('menu.recrutement') . " -";
             }
         }
         echo "</div>";
         $already_call_menu_guild = true;
     }
 }
Example #6
0
<?php

load_css('forum.css', 'forum');
if (verif_connect()) {
    //Si l'utilisateur ne possède pas de Guilde
    if (has_guild()) {
        $titre = "Forum";
        $baseline = '<i>Vous êtes ici : </i><a href ="' . get_link('Main', 'Guild') . '">Index du forum de guilde</a>';
        debug_log("guild forum main => " . print_r($_POST, 1));
        if (request_confirm('End_Add_Cat')) {
            if (has_guild_acces('forum')) {
                if (valid_Post_db('Caranille_Categories')) {
                    insert_db('Caranille_Categories', addslashes_r($_POST));
                    $message = 'page ajouté';
                } else {
                    $message = 'Tous les champs n\'ont pas été remplis';
                }
            }
        }
        if (request_confirm('End_Add_Forum')) {
            if (has_guild_acces('forum')) {
                debug_log(" - has_guild_acces ");
                insert_db('Caranille_Forums', addslashes_r($_POST));
                $message = 'page ajouté';
            }
        }
    }
}
Example #7
0
                    echo '<input ' . (!has_guild_acces('privilege') ? 'readonly="readonly"' : '') . ' ' . (isset($r) ? 'checked="checked"' : "") . ' type="checkbox" name="priv[' . $e . ']" value="' . $priv . '"/>' . $priv . '<br/>';
                }
                echo "<br/>";
            }
            if (isset($array_forum_type) && !empty($array_forum_type)) {
                echo "forums de guilde:<br/>";
                foreach ($array_forum_type as $e => $priv) {
                    $r = get_db("has_privilege", array('Rank_ID' => $_rank['Rank_ID'], 'Access' => $priv));
                    echo '<input ' . (!has_guild_acces('privilege') ? 'readonly="readonly"' : '') . ' ' . (isset($r) ? 'checked="checked"' : "") . ' type="checkbox" name="priv[' . $e . ']" value="' . $priv . '"/>' . $priv . '<br/>';
                }
                echo "<br/>";
            }
            if (isset($array_topic_type) && !empty($array_topic_type)) {
                foreach ($array_topic_type as $e => $priv) {
                    $r = get_db("has_privilege", array('Rank_ID' => $_rank['Rank_ID'], 'Access' => $priv));
                    echo '<input ' . (!has_guild_acces('privilege') ? 'readonly="readonly"' : '') . ' ' . (isset($r) ? 'checked="checked"' : "") . ' type="checkbox" name="priv[' . $e . ']" value="' . $priv . '"/>' . $priv . '<br/>';
                }
                echo "<br/>";
            }
            if (has_guild_acces('privilege')) {
                echo '<input type="hidden" name="rank" value="' . $_rank['Rank_ID'] . '"/>';
                echo '<input type="hidden" name="token" value="' . generer_token("guild-rank-priv-" . $_rank['Rank_ID']) . '"/>';
                echo "<input type='submit' name='priv_rank' /><br/>";
                echo "</form >";
            }
        }
        echo "</td>";
        echo "</tr>";
        echo "</table>";
    }
}