Example #1
0
function getCkBody($content = "", $team)
{
    global $sourceFolder;
    global $cmsFolder;
    global $moduleFolder;
    global $urlRequestRoot;
    global $ICONS;
    require_once "{$sourceFolder}/{$moduleFolder}/article/ckeditor4.4/ckeditor.php";
    $editor = 'ckeditor';
    $CkForm = <<<Ck
      <form action="./+{$team}" method="post">
         <a name="editor"></a>
         <input type="button" id="show_plain" value="Plain Source" onclick="\$('#show_plain').hide();\$('#show_ckeditor').show();CKEDITOR.instances.CKEditor1.updateElement();CKEDITOR.instances.CKEditor1.destroy();document.getElementById('editor').value='plain';">
         <input type="button" id="show_ckeditor" value="CKEditor" style="display:none" onclick="\$('#show_plain').show();\$('#show_ckeditor').hide();CKEDITOR.add(CKEDITOR.editor.replace(document.getElementsByName('CKEditor1')[0]));document.getElementById('editor').value='ckeditor';">
         <input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
         To upload files and images, go to the <a href="#files">files section</a>.<br/>

Ck;
    $top = "<a href='#topquicklinks'>Top</a>";
    $oCKEditor = new CKeditor();
    $oCKEditor->basePath = "{$urlRequestRoot}/{$cmsFolder}/{$moduleFolder}/article/ckeditor4.4/";
    $oCKEditor->config['width'] = '100%';
    $oCKEditor->config['height'] = '300';
    $oCKEditor->returnOutput = true;
    if ($editor == 'ckeditor') {
        $Ckbody = $oCKEditor->editor('CKEditor1', $content);
    } else {
        $Ckbody = $oCKEditor->editor('ne', "");
        //make a auxilary Ckeditor
        ///following destroys the the ckeditor instance as soon as it is initialized. Also hides the Plain Source button
        $Ckbody .= "<script>CKEDITOR.instances.ne.on('instanceReady',function(){ CKEDITOR.instances.ne.destroy()});\$('#show_plain').hide();\$('#show_ckeditor').show();</script>";
        $Ckbody .= '<textarea rows="20" cols="60" style="width:100%" name="CKEditor1" style="display: inline;">' . $content . '</textarea>';
    }
    $CkFooter = <<<Ck1
      <br/>
        <input type='hidden' name='editor' id='editor' value='{$editor}'/>
        <input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
      </form>
      <script language="javascript">
         function submitarticleformPreview(butt) {
           butt.form.action = "./+{$team}&preview=yes#preview";
\t   butt.form.submit();
         }   
         function submitarticleformCancel(butt) {
\t   butt.form.action="./+view";
\t   butt.form.submit();
\t }
\t function submitarticleformDraft(butt) {
\t   butt.form.action="./+view&draft=yes";
\t   butt.form.submit();
\t }
    </script>\t\t\t\t\t\t\t
Ck1;
    return $CkForm . $Ckbody . $CkFooter;
    //.$draftTable.$top.$revisionTable.$top;
}
Example #2
0
 protected function _renderEditor()
 {
     include_once lmb_env_get('LIMB_CKEDITOR_DIR') . '/ckeditor.php';
     $editor = new CKeditor();
     if ($this->_helper->getOption('basePath')) {
         $editor->basePath = $this->_helper->getOption('basePath');
     } else {
         $editor->basePath = '/shared/wysiwyg/ckeditor/';
     }
     $config = array();
     if ($this->_helper->getOption('Config')) {
         $config = $this->_helper->getOption('Config');
     }
     $editor->editor($this->getAttribute('name'), $this->getValue(), $config);
 }
Example #3
0
 public function run()
 {
     if (!$this->hasModel() && !isset($this->name)) {
         throw new CHttpException(500, 'Parameters "model" and "attribute" or "name" have to be set!');
     }
     $ok = $this->attribute;
     if (!empty($this->model) && $ok) {
         $oCKeditor = new CKeditor();
         $this->value = CHtml::resolveValue($this->model, $this->attribute);
         list($this->name, $id) = $this->resolveNameID();
     } elseif (!empty($this->name)) {
         $oCKeditor = new CKeditor();
         $this->value = isset($this->value) ? $this->value : null;
     }
     $oCKeditor->basePath = $this->baseurl . "/ckeditor/";
     $oCKeditor->config['height'] = $this->height;
     $oCKeditor->config['width'] = $this->width;
     if (isset($this->config) && is_array($this->config)) {
         foreach ($this->config as $key => $value) {
             $oCKeditor->config[$key] = $value;
         }
     }
     if ($this->filespath && $this->filesurl) {
         $oCKeditor->config['filebrowserBrowseUrl'] = $this->kcFinderPath . 'browse.php?type=files';
         $oCKeditor->config['filebrowserImageBrowseUrl'] = $this->kcFinderPath . 'browse.php?type=images';
         $oCKeditor->config['filebrowserFlashBrowseUrl'] = $this->kcFinderPath . 'browse.php?type=flash';
         $oCKeditor->config['filebrowserUploadUrl'] = $this->kcFinderPath . 'upload.php?type=files';
         $oCKeditor->config['filebrowserImageUploadUrl'] = $this->kcFinderPath . 'upload.php?type=images';
         $oCKeditor->config['filebrowserFlashUploadUrl'] = $this->kcFinderPath . 'upload.php?type=flash';
         $session = new CHttpSession();
         $session->open();
         $session['KCFINDER'] = array('disabled' => false, 'uploadURL' => $this->filesurl, 'uploadDir' => realpath($this->filespath) . '/');
     }
     $oCKeditor->editor($this->name, isset($this->value) ? $this->value : null);
 }
Example #4
0
echo "\$id_absence=".$id_absence."<br />";
*/
if (isset($tab_id_absence) && count($tab_id_absence) > 1) {
    echo "<p>Faire une proposition de remplacement ou un appel à remplacement pour l'absence de&nbsp;:</p>\n\t<ul>";
    for ($loop = 0; $loop < count($tab_id_absence); $loop++) {
        echo "\n\t\t<li><a href='proposer_remplacement.php?id_absence=" . $tab_id_absence[$loop]['id_absence'] . "'>" . civ_nom_prenom($tab_id_absence[$loop]['login_user']) . "</a></li>";
    }
    echo "\n\t</ul>";
    echo "<p>Ou contrôler/modifier la saisie pour l'absence de&nbsp;:</p>\n\t<ul>";
    for ($loop = 0; $loop < count($tab_id_absence); $loop++) {
        echo "\n\t\t<li><a href='saisir_absence.php?id_absence=" . $tab_id_absence[$loop]['id_absence'] . "&amp;login_user[]=" . $tab_id_absence[$loop]['login_user'] . "'>" . civ_nom_prenom($tab_id_absence[$loop]['login_user']) . "</a></li>";
    }
    echo "\n\t</ul>";
    require "../lib/footer.inc.php";
    die;
}
echo "\n<form action=\"" . $_SERVER['PHP_SELF'] . "#debut_de_page\" method=\"post\" style=\"width: 100%;\" name=\"formulaire_saisie_details\">\n\t<fieldset class='fieldset_opacite50'>\n\n\t\t" . (isset($id_absence) ? "<div style='float:right; width:10em;text-align:center;'><p><a href='proposer_remplacement.php?id_absence={$id_absence}'>Faire une proposition de remplacement ou un appel à remplacement</a>.</p><p style='color:red'>A FAIRE: Indiquer le nombre de créneaux déjà remplacés sur le nombre de créneaux libérés.</p></div>" : "") . "\n\n\t\t" . add_token_field() . "\n\t\t" . (isset($id_absence) ? "<input type='hidden' name='id_absence' value='" . $id_absence . "' />" : "") . "\n\n\t\t<p>Vous souhaitez saisir une absence pour le ou les professeurs suivants&nbsp;:<br /><span class='bold'>";
$tab_prof = array();
for ($loop = 0; $loop < count($login_user); $loop++) {
    $tab_prof[$loop] = get_info_user($login_user[$loop]);
    if ($loop > 0) {
        echo ", ";
    }
    echo "<input type='hidden' name='login_user[]' value='" . $login_user[$loop] . "' />";
    echo $tab_prof[$loop]['denomination'];
}
echo "</span></p>\n\n\t\t<p>Veuillez préciser les dates/heures de début et de fin de l'" . (isset($id_absence) ? "<span class='bold'>absence n°{$id_absence}</span>" : "absence") . "&nbsp;:</p>\n\n\t\t<table class='boireaus boireaus_alt'>\n\t\t\t<tr>\n\t\t\t\t<th>Date de début</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='display_date_debut' id='display_date_debut' size='10' value=\"" . (isset($display_date_debut) ? $display_date_debut : "") . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />\n\t\t" . img_calendrier_js("display_date_debut", "img_bouton_display_date_debut") . "\n\t\t\t\t\t à/en \n\t\t\t\t\t<input type='text' name = 'display_heure_debut' id= 'display_heure_debut' size='5' value = \"" . (isset($display_heure_debut) ? $display_heure_debut : "") . "\" onKeyDown=\"clavier_heure(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t" . choix_heure('display_heure_debut', 'div_choix_heure_debut', 'return') . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Date de fin</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='display_date_fin' id='display_date_fin' size='10' value=\"" . (isset($display_date_fin) ? $display_date_fin : "") . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />\n\t\t" . img_calendrier_js("display_date_fin", "img_bouton_display_date_fin") . "\n\t\t\t\t\t à/en \n\t\t\t\t\t<input type='text' name = 'display_heure_fin' id= 'display_heure_fin' size='5' value = \"" . (isset($display_heure_fin) ? $display_heure_fin : "") . "\" onKeyDown=\"clavier_heure(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t" . choix_heure('display_heure_fin', 'div_choix_heure_fin', 'return') . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Titre/motif</th>\n\t\t\t\t<td style='text-align:left;'>\n\t\t\t\t\t<input type='text' name='titre' id='titre' size='50' value=\"" . (isset($titre) ? $titre : "") . "\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t\t<tr>\n\t\t\t\t<th>Description/détails</th>\n\t\t\t\t<td>";
$oCKeditor = new CKeditor('../ckeditor/');
$oCKeditor->editor('description', preg_replace("/\\\\n/", "", $description));
echo "\n\t\t\t\t</td>\n\t\t\t</tr>\n\n\t\t</table>\n\n\t\t<input type='hidden' name='enregistrer_dates' value='y' />\n\n\t\t<p style='color:red'><input type='checkbox' name='info_ele_parents' id='info_ele_parents' value='y' /><label for='info_ele_parents'> Informer sans attendre les parents en page d'accueil.</label><br />\n\t\t<span style='color:red'>Cette option n'est pas encore implémentée...</span></p>\n\n\t\t<p><input type='submit' value='Valider' /></p>\n\n\t</fieldset>\n</form>";
require "../lib/footer.inc.php";
Example #5
0
<?php

include 'fckeditor.php';
$CKEditor = new CKeditor('Basic');
//$CKEditor = new CKEditor();
$CKEditor->basePath = "/application/libraries/ckeditor/";
$CKEditor->config['height'] = 400;
$CKEditor->config['width'] = 800;
//$CKEditor->ckeditor->ToolbarSet = 'Basic';
$CKEditor->editor("editor1", "");
        $cpt++;
    }
}
echo "\n\t\t</table>";
for ($loop = 0; $loop < count($id_classe); $loop++) {
    echo "\n\t\t<input type='hidden' name='id_classe[]' value='" . $id_classe[$loop] . "' />";
}
for ($loop = 0; $loop < count($engagement_ele); $loop++) {
    echo "\n\t\t<input type='hidden' name='engagement_ele[]' value='" . $engagement_ele[$loop] . "' />";
}
for ($loop = 0; $loop < count($engagement_resp); $loop++) {
    echo "\n\t\t<input type='hidden' name='engagement_resp[]' value='" . $engagement_resp[$loop] . "' />";
}
echo "\n\t\t<div class='noprint'>\n\t\t<p>\n\t\t\t<input type='radio' name='action' id='action_export_csv' value='export_csv' onchange=\"checkbox_change('action_export_csv');checkbox_change('action_message');\" checked /><label for='action_export_csv' id='texte_action_export_csv' style='font-weight:bold;'>Exporter en CSV</label><br />\n\t\t\t<input type='radio' name='action' id='action_message' value='message' onchange=\"checkbox_change('action_export_csv');checkbox_change('action_message');\" /><label for='action_message' id='texte_action_message'>Déposer un message dans le Panneau d'affichage Gepi</label><br />\n\t\t\tTexte du message&nbsp;:";
$contenu = "";
$oCKeditor = new CKeditor('../ckeditor/');
$oCKeditor->editor('message', $contenu);
$annee = strftime("%Y");
$mois = strftime("%m");
$jour = strftime("%d");
$display_date_debut = $jour . "/" . $mois . "/" . $annee;
$annee = strftime("%Y", time() + 86400);
$mois = strftime("%m", time() + 86400);
$jour = strftime("%d", time() + 86400);
$display_date_fin = $jour . "/" . $mois . "/" . $annee;
echo "\n\t\t\t<br />\n\n\t\t\t<i>Le message sera affiché :</i><br />\n\t\t\tde la date : <input type='text' name = 'display_date_debut' id= 'display_date_debut' size='10' value = \"" . $display_date_debut . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />" . img_calendrier_js("display_date_debut", "img_bouton_display_date_debut") . "\n\t\t\t&nbsp;à la date : <input type='text' name = 'display_date_fin' id = 'display_date_fin' size='10' value = \"" . $display_date_fin . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />" . img_calendrier_js("display_date_fin", "img_bouton_display_date_fin") . "<br />(<span style='font-size:small'>Respectez le format jj/mm/aaaa</span>)<br />\n\n\t\t\t<i>Le destinataire peut supprimer ce message&nbsp;:&nbsp;</i>\n\t\t\t<label for='suppression_possible_oui' id='texte_suppression_possible_oui'>Oui </label><input type='radio' name='suppression_possible' id='suppression_possible_oui' value='oui' onchange=\"checkbox_change('suppression_possible_oui');checkbox_change('suppression_possible_non');\" />\n\t\t\t<label for='suppression_possible_non' id='texte_suppression_possible_non' style='font-weight:bold;'>Non </label><input type='radio' name='suppression_possible' id='suppression_possible_non' value='non' checked='checked' onchange=\"checkbox_change('suppression_possible_oui');checkbox_change('suppression_possible_non');\" />\n\t\t</p>\n\n\t\t<p><input type='submit' value='Valider' /></p>\n\n\t\t</div>\n\t</fieldset>\n</form>\n\n<script type='text/javascript' language='javascript'>\n\n\t" . js_checkbox_change_style('checkbox_change', 'texte_', 'n') . "\n\n\tfunction modif_case(statut){\n\t\t// statut: true ou false\n\t\tfor(k=0;k<{$cpt};k++){\n\t\t\tif(document.getElementById('login_user_'+k)){\n\t\t\t\tdocument.getElementById('login_user_'+k).checked=statut;\n\t\t\t\tcheckbox_change('login_user_'+k);\n\t\t\t}\n\t\t}\n\t}\n</script>";
/*
echo "<pre>";
print_r($tab_engagements);
echo "</pre>";
*/
Example #7
0
 *
 * You should have received a copy of the GNU lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Requirements:
 * The CK-Editor have to be installed and configured. The Editor itself is
 * not includet to this extension.
 *
 * This extension have to be installed into:
 * <Yii-Application>/proected/extensions/ckeditor
 *
 * Usage:
 * see-> readme.txt
 */
require_once $ckEditor;
if (isset($name)) {
    $oCKeditor = new CKeditor($name);
} else {
    $oCKeditor = new CKeditor(get_class($model) . '[' . $attribute . ']');
}
$oCKeditor->basePath = $ckBasePath;
if (isset($config) && is_array($config)) {
    foreach ($config as $key => $value) {
        $oCKeditor->config[$key] = $value;
    }
}
if (isset($name)) {
    $oCKeditor->editor($name, $defaultValue);
} else {
    $oCKeditor->editor(get_class($model) . '[' . $attribute . ']', $defaultValue);
}
Example #8
0
 /**
  * Initialize the editMe widget.
  */
 public function init()
 {
     $this->_ckeExtensionPath = dirname(dirname(__FILE__)) . '/editor/source/ckeditor';
     // Start the publishing process if it has not been executed on the current page already
     if (empty(self::$_ckeAssetUrl)) {
         $excludeFiles = Yii::app()->assetManager->excludeFiles;
         array_push(Yii::app()->assetManager->excludeFiles, 'samples');
         self::$_ckeAssetUrl = Yii::app()->assetManager->publish($this->_ckeExtensionPath);
         Yii::app()->assetManager->excludeFiles = $excludeFiles;
         $ckeAssetPath = str_replace(Yii::app()->assetManager->baseUrl, Yii::app()->assetManager->basePath, self::$_ckeAssetUrl);
         if (@is_file($ckeAssetPath . '/editMe/.' . md5(self::$_ckeAssetUrl) . '.min.js') === false) {
             $scriptContents[] = 'var CKEDITOR_BASEPATH=' . CJavaScript::encode(self::$_ckeAssetUrl . '/') . ';';
             $scriptContents[] = @file_get_contents($ckeAssetPath . '/ckeditor.js');
             $scriptContents[] = @file_get_contents($ckeAssetPath . '/adapters/jquery.js');
             @file_put_contents($ckeAssetPath . '/editMe.' . md5(self::$_ckeAssetUrl) . '.min.js', implode("\n", $scriptContents), LOCK_EX);
         }
     }
 }
Example #9
0
    echo "<li>&nbsp;&nbsp;Vous pouvez également signer un ou plusieurs cahiers de textes avec le texte ci-dessous.<br />Le texte par défaut peut être défini <a href='visa_ct.php?definir_visa_par_defaut=y'>ici</a></li>\n";
    echo "</ul>\n";
    //echo "<br /><br />\n";
    ?>

<a name='tableau_des_enseignants'></a>
<form action="visa_ct.php" method="post">
<?php 
    echo add_token_field();
    echo "<div style='width: 820px;'>\n";
    //echo "<fieldset style=\"border: 1px solid grey; font-size: 0.8em; padding-top: 8px; padding-bottom: 8px;  margin-left: auto; margin-right: auto;\">\n";
    //echo "<form enctype=\"multipart/form-data\" action=\"visa_ct.php\" method=\"post\">\n";
    //echo add_token_field();
    echo "<h2 class='gepi' style=\"text-align: center;\">Texte du visa à apposer sur les cahiers de textes</h2>\n";
    echo "<p><em>Mise en forme du visa :</em> <a href='visa_ct.php'>Réinitialiser au visa par défaut</a></p><p>\n";
    $oCKeditor = new CKeditor('../ckeditor/');
    $oCKeditor->editor('texte_visa_FCK', $texte_visa_cdt);
    //echo "<input type='submit' name=\"ok_enr_visa\" value='Enregistrer le visa' /></p>\n";
    //echo "</form>\n";
    //echo "<br /><br />";
    //echo "</fieldset>";
    echo "<br /><br />\n";
    echo "</div>\n";
    if (getSettingAOui('cdt_afficher_volume_docs_joints')) {
        $affichage_volume_docs_joints = isset($_GET['affichage_volume_docs_joints']) ? "y" : NULL;
        if (!isset($affichage_volume_docs_joints)) {
            echo "<p><a href='" . $_SERVER['PHP_SELF'] . "?affichage_volume_docs_joints=y'>Afficher le volume des documents joints aux CDT</a></p>\n";
        }
    }
    ?>
<table class='boireaus' border="1"><tr valign='middle' align='center'>
Example #10
0
        </td>
    </tr>

    <tr <?php 
    if ($nb_ligne % 2) {
        echo "bgcolor=" . $bgcolor;
    }
    $nb_ligne++;
    ?>
>
    <?php 
    $impression = getSettingValue("page_garde_texte");
    echo "<td colspan=\"2\" valign=\"top\"  style=\"font-variant: small-caps;\">Texte de la page de garde apparaissant à la suite de l'adresse : </td>\n\t</tr>";
    // Modif : on utilise toute la largeur de la page pour afficher l'éditeur de textes
    echo "\n\t<tr><td colspan=\"2\" ><div class='small' style='width: 820px;'>\n\t\t<i>Mise en forme du message :</i>";
    $oCKeditor = new CKeditor('../ckeditor/');
    $oCKeditor->editor('no_anti_inject_page_garde_texte', $impression);
    ?>

		</div>
	</td></tr>

</table>

<hr />
<p style="text-align: center;"><input type="submit" name="ok" value="Enregistrer" style="font-variant: small-caps;"/></p>

<?php 
}
// Fin test getSettingAOui('active_bulletins')
?>
Example #11
0
function get_field_langtext($field_value, $type, $field_id = '', $rubric_field_template = '', $tpl_field_empty = 0, &$maxlength = '', $document_fields = 0, $rubric_id = 0, $dropdown = '')
{
    global $AVE_Template, $AVE_Core, $AVE_Document;
    $res = 0;
    switch ($type) {
        case 'edit':
            if (isset($_COOKIE['no_wysiwyg']) && $_COOKIE['no_wysiwyg'] == 1) {
                $field = '<a name="' . $field_id . '"></a>';
                $field .= '<textarea style="width:' . $AVE_Document->_textarea_width . ';height:' . $AVE_Document->_textarea_height . '" name="feld[' . $field_id . ']">' . $field_value . '</textarea>';
            } else {
                switch ($_SESSION['use_editor']) {
                    case '0':
                        // стандартный редактор
                        $oFCKeditor = new FCKeditor('feld[' . $field_id . ']');
                        $oFCKeditor->Height = $AVE_Document->_textarea_height;
                        $oFCKeditor->Value = $field_value;
                        $field = $oFCKeditor->Create($field_id);
                        break;
                    case '1':
                        // Elrte и Elfinder
                        $field = '<a name="' . $field_id . '"></a>';
                        $field .= '<textarea style="width:' . $AVE_Document->_textarea_width . ';height:' . $AVE_Document->_textarea_height . '" name="feld[' . $field_id . ']" class="editor">' . $field_value . '</textarea></div>';
                        break;
                    case '2':
                        // Innova
                        require BASE_DIR . "/admin/templates/default/liveeditor/f_config/li_set_mf.php";
                        $field = '<a name="' . $field_id . '"></a>';
                        $field .= '<textarea style="width:' . $AVE_Document->_textarea_width . ';height:' . $AVE_Document->_textarea_height . '" name="feld[' . $field_id . ']" Id="editor[' . $field_id . ']">' . $field_value . '</textarea>';
                        $field .= $innova[1];
                        break;
                    case '3':
                        // CKEditor
                        $oCKeditor = new CKeditor();
                        $oCKeditor->returnOutput = true;
                        $oCKeditor->config['toolbar'] = 'Big';
                        $oCKeditor->config['height'] = 400;
                        $config = array();
                        $field = $oCKeditor->editor('feld[' . $field_id . ']', $field_value, $config);
                        break;
                }
            }
            $res = $field;
            break;
        case 'doc':
            $res = get_field_smalltext($field_value, $type, $field_id, $rubric_field_template, $tpl_field_empty, $maxlength, $document_fields, $rubric_id);
            break;
        case 'req':
            $res = get_field_default($field_value, $type, $field_id, $rubric_field_template, $tpl_field_empty, $maxlength, $document_fields, $rubric_id);
            break;
        case 'name':
            $res = 'FIELD_TEXTAREA';
            break;
    }
    return $res ? $res : $field_value;
}
Example #12
0
    $i++;
  }
  echo "</table>\n";
} else {
  echo "<p>Actuellement aucun item n'est présent dans la base.";
}


echo "<hr />";
$contenu = getSettingValue("mod_inscription_explication");

echo "<form name=\"formulaire3\" method=\"post\"  action=\"inscription_config.php\">\n";
echo add_token_field();
echo "<H2>Titre du module</H2>\n";
echo "<input type=\"text\" name=\"mod_inscription_titre\" size=\"40\" value=\"".getSettingValue("mod_inscription_titre")."\" />\n";
echo "<H2>Texte explicatif</H2>\n";
echo "<p>Le texte ci-dessous sera visible par les personnes accédant au module d'inscription/désincription.</p>\n";
echo "<input type=\"hidden\" name=\"is_posted_notes\" value=\"yes\" />\n";
    // lancement de CKeditor

    $oCKeditor = new CKeditor('../ckeditor/');
    $oCKeditor->editor('no_anti_inject_notes',$contenu) ;

//echo "<div id=\"fixe\">\n";
echo "<center>";
echo "<input type=\"submit\" name=\"ok\" value=\"Enregistrer\" />";
echo "</center>\n";
//echo "</div>\n";
echo "</form>\n";
require("../lib/footer.inc.php");?>
 /**
  * Compila el formulario de acuerdo con los
  * parametros seleccionados previos.
  *
  * @param integer $intCols Numero de columnas
  * @return string
  */
 private function compileForm($cols)
 {
     $buf = '' . "\n";
     if (count($this->arrayCKEditorInstances)) {
         $buf .= '<script type=\'text/javascript\'>' . "\n";
         $buf .= "\t" . 'var CKEditorInstances = new Object();' . "\n";
         foreach ($this->arrayCKEditorInstances as $instance) {
             $buf .= "\t" . 'CKEditorInstances["' . $this->getColspanRowspan($instance) . '"] = "' . $this->getColspanRowspan($instance) . '";' . "\n";
         }
         $buf .= '</script>' . "\n";
     }
     $buf .= '<!--' . "\n";
     $buf .= 'OSEZNO PHP FRAMEWORK' . "\n";
     $buf .= 'Generado con la clase para la creacion de Formularios myForm.class.php' . "\n";
     $buf .= 'Formulario: ' . $this->name . '' . "\n";
     $buf .= 'Autor: Jose Ignacio Gutierrez Guzman <http://www.osezno-framework.org/joselitohacker/>' . "\n";
     $buf .= '-->' . "\n";
     if ($this->useAddFile && !$this->useAddFileAfterLoad) {
         $buf .= $this->getJavaScriptSWFUploader($this->uploaderIdArray);
     }
     $this->cols = $cols;
     $buf .= '<form ';
     $buf .= 'onsubmit="' . $this->onSubmitAction . '" ';
     if ($this->action) {
         $buf .= 'action="' . $this->action . '" ';
     }
     $buf .= 'method="' . $this->method . '" ';
     if ($this->enctype) {
         $buf .= 'enctype= "' . $this->enctype . '" ';
     }
     $buf .= 'name="' . $this->name . '" id="' . $this->name . '" target="' . $this->target . '">' . "\n";
     $buf .= '<div class="' . $this->styleClassForm . '" align="center" id="div_' . $this->name . '" name="div_' . $this->name . '">' . "\n";
     if (strlen($this->strFormFieldSet)) {
         $buf .= '<fieldset><legend class="' . $this->styleClassFieldsets . '">' . $this->strFormFieldSet . '</legend>' . "\n";
     }
     # Creamos cada uno de los Objetos HTML con el objetivo de que mas adelante sean procesados en: Grupos, o Independientemente.
     if (count($this->Objects)) {
         $ObjectKeys = array_keys($this->Objects);
         $countObjects = count($this->Objects['field']);
         for ($j = 0, $objKeysFields = array_keys($this->Objects['field']); $j < $countObjects; ++$j) {
             $campos_f = explode($this->Separador, $this->Objects['field'][$objKeysFields[$j]]);
             switch ($campos_f[0]) {
                 case 'text':
                     // Ok colSpan
                     $strEvents = '';
                     $keypress = '';
                     if ($campos_f[6]) {
                         $keypress = ' onKeyPress="return OnlyNum(event)"';
                     }
                     $utilyVal = '';
                     $LauncherCalendar = '';
                     if ($campos_f[7]) {
                         $utilyVal = 'onKeyUp="CalendarFormat( this );" onBlur="BlurDate( this )"';
                         $LauncherCalendar = '<td><button ' . $this->checkIfIsDisabled($campos_f[2]) . ' type="button" class="boton_cal" id="trigger_' . $campos_f[2] . '"  name="trigger_' . $campos_f[2] . '" onClick="addCalendarWindow(document.forms[\'' . $this->name . '\'].elements[\'' . $campos_f[2] . '\'].value, \'' . $campos_f[2] . '\', \'' . $campos_f[2] . '\', \'' . $this->name . '\', pathUrl)" /><img border="0" src="' . '' . $this->pathImages . $this->srcImageCalendarButton . '"></button></td>';
                     } else {
                         $strEvents = $this->checkExistEventJs($campos_f[2]);
                     }
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld><table cellpadding="0" border="0" cellspacing="0"><tr><td><input ' . $this->checkAutoCompleteStatus($campos_f[2]) . ' ' . $this->checkIsHelping($campos_f[2]) . ' class="' . $this->styleClassFields . '" type="text" name="' . $campos_f[2] . '" id="' . $campos_f[2] . '" value="' . $campos_f[3] . '" size="' . $campos_f[4] . '" ' . $utilyVal . ' maxlength="' . $campos_f[5] . '"' . $keypress . '' . $strEvents . '' . $this->checkIfIsDisabled($campos_f[2]) . '></td>' . $LauncherCalendar . '</tr></table></td>' . "\n";
                     break;
                 case 'password':
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld><input ' . $this->checkAutoCompleteStatus($campos_f[2]) . ' ' . $this->checkIsHelping($campos_f[2]) . ' class="' . $this->styleClassFields . '" type="password" name="' . $campos_f[2] . '" id="' . $campos_f[2] . '" value="' . $campos_f[3] . '" size="' . $campos_f[4] . '" maxlength="' . $campos_f[5] . '" ' . $this->checkExistEventJs($campos_f[2]) . ' ' . $this->checkIfIsDisabled($campos_f[2]) . '></td>' . "\n";
                     break;
                 case 'file':
                     $bufTemp = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld>';
                     //$bufTemp .= '<button '.$this->checkIfIsDisabled($campos_f[2]).' '.$this->checkIsHelping($campos_f[2]).' class="'.$this->styleClassButtons.'" id="'.$campos_f[2].'" type="button"  onclick="'.$SWFonClick.'">';
                     $bufTemp .= '<span id="' . $this->FILE_button_placeholder_id . '' . $campos_f[2] . '">';
                     $maxInfoSize = '';
                     if ($this->FILES_atts[$campos_f[2]]['show_max_upload_size_info_in_button']) {
                         if ($this->FILES_atts[$campos_f[2]]['size_limit'] < 1024) {
                             $maxFileSizeUpload = '(' . $this->FILES_atts[$campos_f[2]]['size_limit'] . ' Kb)';
                         } else {
                             if ($this->FILES_atts[$campos_f[2]]['size_limit'] < 1048576) {
                                 $maxFileSizeUpload = '(' . number_format($this->FILES_atts[$campos_f[2]]['size_limit'] / 1024, 2) . ' Mb)';
                             } else {
                                 $maxFileSizeUpload = '(' . number_format($this->FILES_atts[$campos_f[2]]['size_limit'] / 1048576, 2) . ' Gb)';
                             }
                         }
                         $maxInfoSize = '<font style="vertical-align: middle; font-size: 6pt; font-weight: bold;">' . $maxFileSizeUpload . '</font>';
                     }
                     //$bufTemp .= $this->FILE_str_etq_button.$maxInfoSize.'</button><div style="text-align: left;" class="'.$this->styleClassTags.'" id="div_file_progress" name="div_file_progress"></div>';
                     $bufTemp .= '</span><div style="text-align: left;" class="' . $this->styleClassTags . '" id="div_file_progress" name="div_file_progress"></div>';
                     $bufTemp .= '</td>' . "\n";
                     $this->arrayFormElements[$campos_f[2]] = $bufTemp;
                     break;
                 case 'select':
                     $multiple = '';
                     if ($campos_f[6]) {
                         $multiple = ' multiple';
                     }
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld>' . "\n\t\t" . '<select ' . $this->checkIsHelping($campos_f[2]) . ' class="' . $this->styleClassFields . '" name="' . $campos_f[2] . '" id="' . $campos_f[2] . '"' . $multiple . ' size="' . $campos_f[4] . '" ' . $this->checkExistEventJs($campos_f[2]) . ' ' . $this->checkIfIsDisabled($campos_f[2]) . '>' . "\n\t\t" . $campos_f[3] . "\t\t" . '</td>' . "\n";
                     break;
                 case 'hidden':
                     $this->arrayFormElements[$campos_f[1]] = '<td rowSpanEtq colSpanEtq widthEtq>' . '<input type="hidden" name="' . $campos_f[1] . '" id="' . $campos_f[1] . '" value="' . $campos_f[2] . '">' . '</td><td rowSpanFld colSpanFld widthFld>' . "&nbsp;" . '</td>' . "\n";
                     break;
                 case 'textarea':
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq style="text-align:center" colSpanEtq  class="' . $this->styleClassTags . '">' . $campos_f[1] . '<br>' . '' . '<textarea ' . $this->checkIsHelping($campos_f[2]) . ' class="' . $this->styleClassFields . '" name="' . $campos_f[2] . '" id="' . $campos_f[2] . '" cols="' . $campos_f[4] . '" rows="' . $campos_f[5] . '" wrap="' . $campos_f[6] . '" ' . $this->checkExistEventJs($campos_f[2]) . ' ' . $this->checkIfIsDisabled($campos_f[2]) . '>' . $campos_f[3] . '</textarea></td>' . "\n";
                     break;
                 case 'WYSIWYG':
                     switch ($this->WYSIWYG_type) {
                         case 'ck_editor':
                             $pathckEditor = ROOT_PATH . DS . 'plugin' . DS . 'ck_editor' . DS . 'ckeditor.php';
                             require $pathckEditor;
                             $oCKeditor = new CKeditor();
                             $events = array();
                             $config = array();
                             $oCKeditor->returnOutput = true;
                             $oCKeditor->basePath = $this->WYSIWYG_editor_BasePath;
                             $oCKeditor->config['width'] = $this->WYSIWYG_editor_Width;
                             $oCKeditor->config['height'] = $this->WYSIWYG_editor_Height;
                             $oCKeditor->config['toolbar_Basic'] = array(array('Source', 'Preview', 'ShowBlocks'), array('Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'), array('Find', 'Replace'), array('Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'), array('NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'), array('JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('BidiLtr', 'BidiRtl'), array('Link', 'Unlink', 'Anchor'), array('Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'), array('Format', 'Font', 'FontSize'), array('TextColor', 'BGColor'), array('About'));
                             $oCKeditor->config['toolbar'] = 'Basic';
                             $oCKeditor->config['skin'] = 'kama';
                             $this->arrayFormElements[$campos_f[2]] = '' . '<td rowSpanEtq ' . $this->checkIsHelping($campos_f[2]) . ' style="text-align:center" colSpanEtq class="' . $this->styleClassTags . '">' . $campos_f[1] . "<br>" . $oCKeditor->editor($campos_f[2], $campos_f[3], $events, $config) . '</td>' . "\n";
                             break;
                     }
                     break;
                 case 'mylist':
                     /**
                      * TODO: Crear una lista dinamica con campos check box que permitan chequear elementos correspondientes a una tabla de base de datos o IDs asociados a un resultado de una consulta
                      */
                     break;
                 case 'whitespace':
                     $this->arrayFormElements[$campos_f[1]] = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq><div name="e_' . $campos_f[1] . '" id="e_' . $campos_f[1] . '">' . $campos_f[2] . '</div></td><td rowSpanFld colSpanFld widthFld class="' . $this->styleClassFields . '"><div name="c_' . $campos_f[1] . '" id="c_' . $campos_f[1] . '">' . $campos_f[3] . '</div></td>' . "\n";
                     break;
                 case 'coment':
                     $this->arrayFormElements[$campos_f[1]] = '<td widthCell rowSpanEtq class="' . $this->styleClassComments . '" colSpanEtq>' . $campos_f[2] . '</td>';
                     break;
                 case 'checkbox':
                     $cheked = '';
                     if ($campos_f[3] == true) {
                         $cheked = 'checked';
                     }
                     $onClickTag = '';
                     if (!$this->checkIfIsDisabled($campos_f[2])) {
                         $onClickTag = 'onclick="checkear(\'' . $campos_f[2] . '\')"';
                     }
                     $onEvent = $this->checkExistEventJs($campos_f[2]);
                     if ($onEvent && !$this->checkIfIsDisabled($campos_f[2])) {
                         $onClickTag = str_ireplace('onclick="', 'onclick="checkear(\'' . $campos_f[2] . '\'),', $onEvent);
                     }
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq colSpanEtq ' . $onClickTag . ' class="' . $this->styleClassTags . '"  widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld><input ' . $onEvent . ' ' . $this->checkIsHelping($campos_f[2]) . ' class="' . $this->styleClassFields . '" type="checkbox" name="' . $campos_f[2] . '" id="' . $campos_f[2] . '" ' . $cheked . ' ' . $this->checkIfIsDisabled($campos_f[2]) . '>' . '</td>' . "\n";
                     break;
                 case 'radiobutton':
                     $cheked = '';
                     if ($campos_f[5] == true) {
                         $cheked = 'checked';
                     }
                     $this->arrayFormElements[$campos_f[2]] = '<td rowSpanEtq colSpanEtq class="' . $this->styleClassTags . '" widthEtq>' . $campos_f[1] . '</td>' . '<td rowSpanFld colSpanFld widthFld><input ' . $this->checkIsHelping($campos_f[4]) . ' class="' . $this->styleClassFields . '" type="radio" name="' . $campos_f[4] . '" id="' . $campos_f[4] . '_' . $campos_f[3] . '" value="' . $campos_f[3] . '" ' . $this->checkExistEventJs($campos_f[4]) . ' ' . $this->checkIfIsDisabled($campos_f[4]) . ' ' . $cheked . '></td>' . "\n";
                     break;
                 case 'button':
                     $bufButton = '<button ' . $this->checkIsHelping($campos_f[1]) . ' ' . $this->checkIfIsDisabled($campos_f[1]) . ' value="' . trim(strip_tags($campos_f[2])) . '" class="' . $this->styleClassButtons . '" type="submit" name="' . $campos_f[1] . '" id="' . $campos_f[1] . '" ' . $this->checkExistEventJs($campos_f[1]);
                     $bufButton .= '>';
                     $bufButton .= '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
                     if ($campos_f[3]) {
                         $bufButton .= '<td align="right"><img style="padding-right: 2px;" src="' . $campos_f[3] . '" border="0"></td>';
                     }
                     $bufButton .= '<td class="boton_font">' . str_replace(' ', '&nbsp;', $campos_f[2]) . '</td></tr></table>';
                     $bufButton .= '</button>';
                     $this->arrayFormElements[$campos_f[1]] = '<td widthCell rowSpanEtq style="text-align:center" colSpanEtq>' . $bufButton . '</td>';
                     break;
             }
         }
     }
     /**
      * Creamos el HTML de cada unos de lo grupos que agrupan campos
      */
     $countArrayGroups = count($this->arrayGroups);
     for ($kAgrupa = 0; $kAgrupa < $countArrayGroups; ++$kAgrupa) {
         $bufHTMLgroup = '';
         $bufHTMLgroup .= '';
         $hrefUseShowHideIni = '';
         $hrefUseShowHideEnd = '';
         $styleDivFieldSet = '';
         if ($this->arrayGroups[$kAgrupa]['useShowHide']) {
             $hrefUseShowHideIni = '<a href="javascript:void(MostrarEsconderFieldSet(\'' . $this->arrayGroups[$kAgrupa]['idGroup'] . '\'))">';
             $hrefUseShowHideEnd = '</a>';
             switch ($this->arrayGroups[$kAgrupa]['iniVisibilitySts']) {
                 case 'show':
                     $styleDivFieldSet = ' style="display:\'\';"';
                     break;
                 case 'hide':
                     $styleDivFieldSet = ' style="display: none;"';
                     break;
             }
         }
         $bufHTMLgroup .= '<fieldset style="width:' . $this->width . '"><legend class="' . $this->styleClassFieldsets . '">' . $hrefUseShowHideIni . $this->arrayGroups[$kAgrupa]['strFieldSet'] . $hrefUseShowHideEnd . '</legend>' . "\n";
         $bufHTMLgroup .= '<div name="' . $this->arrayGroups[$kAgrupa]['idGroup'] . '" id="' . $this->arrayGroups[$kAgrupa]['idGroup'] . '"' . $styleDivFieldSet . '>' . "\n";
         #  Preguntamos si el grupo en proceso es un arreglo de elementos
         if (is_array($this->arrayGroups[$kAgrupa])) {
             $bufHTMLgroup .= '<table class="' . $this->styleClassTableForm . '" border="' . $this->border . '" align="center" cellpadding="' . $this->cellPadding . '" cellspacing="' . $this->cellSpacing . '" valign="top" width="100%">' . "\n";
             $kCamposDe = count($this->arrayGroups[$kAgrupa]['arraystrIdFields']);
             # Calculamos cuantos filas y columna tendra este marco
             $widthCol = intval(100 / ($this->arrayGroups[$kAgrupa]['intColsByGroup'] * 2));
             # Numero de filas
             $cantCamposInGroup = count($this->arrayGroups[$kAgrupa]['arraystrIdFields']);
             $iTemp = 0;
             $numColSpan = 0;
             $cantTr = 0;
             $sumNumColSpan = 0;
             for ($i = 0; $i < $cantCamposInGroup; ++$i) {
                 $nameField = $this->arrayGroups[$kAgrupa]['arraystrIdFields'][$i];
                 if (!($iTemp % $this->arrayGroups[$kAgrupa]['intColsByGroup']) || !$iTemp) {
                     $htmlUseRowSeparator = '';
                     if ($this->useRowSeparator) {
                         if (!(($cantTr + 2) % 2)) {
                             $htmlUseRowSeparator = 'class = "' . $this->styleClassRowSeparator . '"';
                         }
                     }
                     $bufHTMLgroup .= "\t" . '<tr ' . $htmlUseRowSeparator . '>' . "\n";
                     ++$cantTr;
                 }
                 if (isset($this->arrayFormElementsColspan[$nameField])) {
                     if ($this->arrayFormElementsColspan[$nameField]) {
                         $numColSpan = $this->arrayFormElementsColspan[$nameField];
                         $iTemp += $numColSpan;
                         $sumNumColSpan += $numColSpan;
                     } else {
                         $numColSpan = 0;
                         ++$iTemp;
                         ++$sumNumColSpan;
                     }
                 } else {
                     $numColSpan = 0;
                     ++$iTemp;
                     ++$sumNumColSpan;
                 }
                 $attObj = $this->arrayFormElementType[$nameField];
                 if ($numColSpan) {
                     if (in_array($attObj, $this->arrayTypeElemSpecial)) {
                         $bufHTMLgroup .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('width="' . intval($widthCol * $numColSpan) . '%"', 'width="' . intval($widthCol * $numColSpan) . '%"', 'width="' . intval($widthCol * $numColSpan) . '%"', 'colspan="' . $numColSpan * 2 . '"', 'colspan="' . $numColSpan * 2 . '"', '', ''), $this->arrayFormElements[$nameField]);
                     } else {
                         $bufHTMLgroup .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('', 'width="' . intval($widthCol * $numColSpan) . '%"', 'width="' . intval($widthCol * $numColSpan) . '%"', 'colspan="' . $numColSpan . '"', 'colspan="' . $numColSpan . '"', '', ''), $this->arrayFormElements[$nameField]);
                     }
                 } else {
                     if (in_array($attObj, $this->arrayTypeElemSpecial)) {
                         $bufHTMLgroup .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('width="' . intval($widthCol * 2) . '%"', 'width="' . intval($widthCol) . '%"', 'width="' . intval($widthCol) . '%"', 'colspan="2"', 'colspan="2"', '', ''), $this->arrayFormElements[$nameField]);
                     } else {
                         $bufHTMLgroup .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('', 'width="' . intval($widthCol) . '%"', 'width="' . intval($widthCol) . '%"', '', '', '', ''), $this->arrayFormElements[$nameField]);
                     }
                 }
                 if (!($iTemp % $this->arrayGroups[$kAgrupa]['intColsByGroup']) && $iTemp) {
                     $bufHTMLgroup .= "\t" . '</tr>' . "\n";
                 }
             }
             //Calculamos las que faltan para completar el combo
             $tdFaltan = $cantTr * $this->arrayGroups[$kAgrupa]['intColsByGroup'] - $sumNumColSpan;
             if ($tdFaltan) {
                 for ($i = 0; $i < $tdFaltan; ++$i) {
                     $bufHTMLgroup .= "\t\t" . '<td class="' . $this->styleClassTags . '">&nbsp;</td><td class="' . $this->styleClassTags . '">&nbsp;</td>' . "\n";
                 }
                 $bufHTMLgroup .= "\t" . '</tr>' . "\n";
             }
             $bufHTMLgroup .= '</table>' . "\n";
         } else {
             $bufHTMLgroup .= '';
         }
         $bufHTMLgroup .= '</div>' . "\n";
         $bufHTMLgroup .= '</fieldset>' . "\n\n";
         $this->arrayGroupsElementsHTML[$this->arrayGroups[$kAgrupa]['idGroup']] = $bufHTMLgroup;
     }
     /**
      * Recorrer cada unos de los grupos que agrupan
      * grupos de campos para poder dividirlos.
      */
     $countarrayGroupsIdInShareSpace = count($this->arrayGroupsIdInShareSpace);
     $arrayKeysGroupingGroups = array_keys($this->arrayGroupsIdInShareSpace);
     for ($i = 0; $i < $countarrayGroupsIdInShareSpace; ++$i) {
         // Pregunta de seguridad
         if (is_array($arrayGroupsIdInShareSpace = $this->arrayGroupsIdInShareSpace[$arrayKeysGroupingGroups[$i]]['arrayIdGroups'])) {
             $buf .= '<table width="' . $this->width . '" border="' . $this->border . '" cellspacing="0">' . "\n";
             $buf .= '<tr>' . "\n";
             $countArGpIdInShSp = count($arrayGroupsIdInShareSpace);
             for ($j = 0; $j < $countArGpIdInShSp; ++$j) {
                 $buf .= '<td width="' . intval(100 / count($arrayGroupsIdInShareSpace)) . '%" align="center">' . str_replace('width:' . $this->width . '', 'width:' . ($this->width / $countArGpIdInShSp - 17), $this->arrayGroupsElementsHTML[$arrayGroupsIdInShareSpace[$j]]) . '</td>' . "\n";
                 $this->arrayGroupsShown[] = $arrayGroupsIdInShareSpace[$j];
             }
             $buf .= '</tr>' . "\n";
             $buf .= '</table>' . "\n";
         }
     }
     # Mostrar cada uno de los grupos que no han sido mostrados
     for ($i = 0; $i < $countArrayGroups; ++$i) {
         if (!in_array($this->arrayGroups[$i]['idGroup'], $this->arrayGroupsShown)) {
             $buf .= $this->arrayGroupsElementsHTML[$this->arrayGroups[$i]['idGroup']];
             $this->arrayGroupsShown[] = $this->arrayGroups[$i]['idGroup'];
         }
     }
     # Calculamos los Id de los objectos definidos del formulario que no han sido definidos
     $countArrayFormElements = count($this->arrayFormElements);
     $arrayKeysFormElements = array_keys($this->arrayFormElements);
     for ($i = 0; $i < $countArrayFormElements; ++$i) {
         if (!in_array($arrayKeysFormElements[$i], $this->arrayFormElementsShown)) {
             $this->arrayFormElementsToShow[] = $arrayKeysFormElements[$i];
         }
     }
     # Imprimimos los elementos del formulario restantes
     $buf .= '<table border="' . $this->border . '" align="center" cellpadding="' . $this->cellPadding . '" cellspacing="' . $this->cellSpacing . '" valign="top" width="' . $this->width . '" height="' . $this->height . '">' . "\n";
     $widthCol = intval(100 / ($this->cols * 2));
     $cantCamposToShow = count($this->arrayFormElementsToShow);
     $iTemp = 0;
     $numColSpan = 0;
     $cantTr = 0;
     $sumNumColSpan = 0;
     for ($i = 0; $i < $cantCamposToShow; ++$i) {
         $nameField = $this->arrayFormElementsToShow[$i];
         if (!($iTemp % $this->cols) || !$iTemp) {
             $htmlUseRowSeparator = '';
             if ($this->useRowSeparator) {
                 if (!(($cantTr + 2) % 2)) {
                     $htmlUseRowSeparator = ' class = "' . $this->styleClassRowSeparator . '"';
                 }
             }
             $buf .= "\t" . '<tr' . $htmlUseRowSeparator . '>' . "\n";
             ++$cantTr;
         }
         if (isset($this->arrayFormElementsColspan[$nameField])) {
             if ($this->arrayFormElementsColspan[$nameField]) {
                 $numColSpan = $this->arrayFormElementsColspan[$nameField];
                 $iTemp += $numColSpan;
                 $sumNumColSpan += $numColSpan;
             } else {
                 $numColSpan = 0;
                 ++$iTemp;
                 ++$sumNumColSpan;
             }
         } else {
             $numColSpan = 0;
             ++$iTemp;
             ++$sumNumColSpan;
         }
         $attObj = $this->arrayFormElementType[$nameField];
         if ($numColSpan) {
             if (in_array($attObj, $this->arrayTypeElemSpecial)) {
                 $buf .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('', 'width="' . intval($widthCol * $numColSpan) . '%"', 'width="' . intval($widthCol * $numColSpan) . '%"', 'colspan="' . $numColSpan * 2 . '"', 'colspan="' . $numColSpan * 2 . '"', '', ''), $this->arrayFormElements[$nameField]);
             } else {
                 $buf .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('', 'width="' . intval($widthCol * $numColSpan) . '%"', 'width="' . intval($widthCol * $numColSpan) . '%"', 'colspan="' . $numColSpan . '"', 'colspan="' . $numColSpan . '"', '', ''), $this->arrayFormElements[$nameField]);
             }
         } else {
             if (in_array($attObj, $this->arrayTypeElemSpecial)) {
                 $buf .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('width="' . intval($widthCol * 2) . '%"', 'width="' . intval($widthCol) . '%"', 'width="' . intval($widthCol) . '%"', 'colspan="2"', 'colspan="2"', '', ''), $this->arrayFormElements[$nameField]);
             } else {
                 $buf .= "\t\t" . str_replace($this->arrayAttributesToReplaceInRow, array('', 'width="' . intval($widthCol) . '%"', 'width="' . intval($widthCol) . '%"', '', '', '', ''), $this->arrayFormElements[$nameField]);
             }
         }
         if (!($iTemp % $this->cols) && $iTemp) {
             $buf .= "\t" . '</tr>' . "\n";
         }
     }
     $tdFaltan = $cantTr * $this->cols - $sumNumColSpan;
     if ($tdFaltan) {
         for ($i = 0; $i < $tdFaltan; ++$i) {
             $buf .= "\t\t" . '<td class="' . $this->styleClassTags . '">&nbsp;</td><td class="' . $this->styleClassTags . '">&nbsp;</td>' . "\n";
         }
         $buf .= "\t" . '</tr>' . "\n";
     }
     $buf .= '</table>' . "\n";
     if (strlen($this->strFormFieldSet)) {
         $buf .= '</fieldset>' . "\n";
     }
     $buf .= '</div>' . "\n";
     $buf .= '</form>' . "\n";
     $buf .= '<!-- Fin de Formulario: ' . $this->name . ' -->' . "\n";
     return $buf;
 }
Example #14
0
		<th>Informations</th>
	</tr>";

	$tab_statuts_MonCompteAfficheInfo=array('administrateur', 'scolarite', 'cpe', 'professeur', 'secours', 'eleve', 'responsable', 'autre');
	for($loop=0;$loop<count($tab_statuts_MonCompteAfficheInfo);$loop++) {
		echo "
	<tr>
		<th>".ucfirst($tab_statuts_MonCompteAfficheInfo[$loop])."</th>
		<td><input type='checkbox' name='MonCompteAfficheInfo".ucfirst($tab_statuts_MonCompteAfficheInfo[$loop])."' value='y' ";
		if(getSettingAOui('MonCompteAfficheInfo'.ucfirst($tab_statuts_MonCompteAfficheInfo[$loop]))) { echo "checked ";}
		echo "/></td>
		<td>";

		//echo "<textarea name='no_anti_inject_MonCompteInfo".ucfirst($tab_statuts_MonCompteAfficheInfo[$loop])."' rows='5' cols='80'>".getSettingValue('MonCompteInfo'.ucfirst($tab_statuts_MonCompteAfficheInfo[$loop]))."</textarea>";

			$oCKeditor = new CKeditor('../ckeditor/');
			$oCKeditor->editor('MonCompteInfo'.ucfirst($tab_statuts_MonCompteAfficheInfo[$loop]).'FCK',getSettingValue('MonCompteInfo'.ucfirst($tab_statuts_MonCompteAfficheInfo[$loop]))) ;

		echo "
		</td>
	</tr>";
	}

	echo "
</table>
<input type='hidden' name='mode' value='MonCompteAfficheInfo' />
<input type='hidden' name='enregistrer_MonCompteAfficheInfo' value='y' />
<p><input type='submit' value='Enregistrer' /></p>
</form>

<p><br /></p>\n";
Example #15
0
    public function getCkBody($content = "")
    {
        global $sourceFolder;
        global $cmsFolder;
        global $moduleFolder;
        global $urlRequestRoot;
        global $ICONS;
        require_once "{$sourceFolder}/{$moduleFolder}/article/ckeditor3.5/ckeditor.php";
        $query = "SELECT * FROM `article_content` WHERE `page_modulecomponentid`= '{$this->moduleComponentId}'";
        $result = mysql_query($query);
        $temp = mysql_fetch_assoc($result);
        if ($content == "") {
            $content = $temp['article_content'];
        }
        $editor = $temp['default_editor'];
        $CkForm = <<<Ck
\t\t\t\t\t\t<form action="./+edit" method="post">
\t\t\t\t\t\t<a name="editor"></a>
<input type="button" id="show_plain" value="Plain Source" onclick="\$('#show_plain').hide();\$('#show_ckeditor').show();CKEDITOR.instances.CKEditor1.updateElement();CKEDITOR.instances.CKEditor1.destroy();document.getElementById('editor').value='plain';">
<input type="button" id="show_ckeditor" value="CKEditor" style="display:none" onclick="\$('#show_plain').show();\$('#show_ckeditor').hide();CKEDITOR.add(CKEDITOR.editor.replace(document.getElementsByName('CKEditor1')[0]));document.getElementById('editor').value='ckeditor';">

\t\t\t\t\t\t<input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
                        To upload files and images, go to the <a href="#files">files section</a>.<br/>
Ck;
        $top = "<a href='#topquicklinks'>Top</a>";
        $oCKEditor = new CKeditor();
        $oCKEditor->basePath = "{$urlRequestRoot}/{$cmsFolder}/{$moduleFolder}/article/ckeditor3.5/";
        $oCKEditor->config['width'] = '100%';
        $oCKEditor->config['height'] = '300';
        $oCKEditor->returnOutput = true;
        if ($editor == 'ckeditor') {
            $Ckbody = $oCKEditor->editor('CKEditor1', $content);
        } else {
            $Ckbody = $oCKEditor->editor('ne', "");
            //make a auxilary Ckeditor
            ///following destroys the the ckeditor instance as soon as it is initialized. Also hides the Plain Source button
            $Ckbody .= "<script>CKEDITOR.instances.ne.on('instanceReady',function(){ CKEDITOR.instances.ne.destroy()});\$('#show_plain').hide();\$('#show_ckeditor').show();</script>";
            $Ckbody .= '<textarea rows="20" cols="60" style="width:100%" name="CKEditor1" style="display: inline;">' . $content . '</textarea>';
        }
        $CkFooter = <<<Ck1
<br/>
<input type='hidden' name='editor' id='editor' value='{$editor}'/>
\t\t\t\t\t      <input type="button" value="Cancel" onclick="submitarticleformCancel(this);"><input type="submit" value="Save"><input type="button" value="Preview" onclick="submitarticleformPreview(this)"><input type="button" value="Draft" onclick="submitarticleformDraft(this);">
\t\t\t\t\t   \t\t </form>
\t\t\t\t\t   \t <script language="javascript">
\t\t\t\t\t    \tfunction submitarticleformPreview(butt) {
\t\t\t\t\t    \t\tbutt.form.action = "./+edit&preview=yes#preview";
\t\t\t\t\t    \t\tbutt.form.submit();
\t\t\t\t\t    \t}
\t\t\t\t\t    \tfunction submitarticleformCancel(butt) {
\t\t\t\t\t    \t\tbutt.form.action="./+view";
\t\t\t\t\t    \t\tbutt.form.submit();
\t\t\t\t\t    \t}
\t\t\t\t\t    \tfunction submitarticleformDraft(butt) {
\t\t\t\t\t    \t\tbutt.form.action="./+view&draft=yes";
\t\t\t\t\t    \t\tbutt.form.submit();
\t\t\t\t\t    \t}
\t\t\t\t\t    </script><br />
\t\t\t\t\t    {$top}
\t\t\t\t\t    <fieldset>
\t\t\t\t\t        <legend><a name="files">{$ICONS['Uploaded Files']['small']}Uploaded Files</a></legend>
\t\t\t\t\t\t\t
Ck1;
        $CkFooter .= getUploadedFilePreviewDeleteForm($this->moduleComponentId, "article", './+edit');
        $CkFooter .= '<br />Upload files : <br />' . getFileUploadForm($this->moduleComponentId, "article", './+edit', UPLOAD_SIZE_LIMIT, 5) . '</fieldset>';
        /* Revisions available */
        $revisionquery = "SELECT MAX(article_revision) AS MAX FROM `article_contentbak` where page_modulecomponentid = '{$this->moduleComponentId}'";
        $revisionresult = mysql_query($revisionquery);
        $revisionrow = mysql_fetch_assoc($revisionresult);
        $start = $revisionrow['MAX'] - 10;
        if (isset($_GET['revisionno'])) {
            $start = escape($_GET['revisionno']);
        }
        if ($start > $revisionrow['MAX'] - 9) {
            $start = $revisionrow['MAX'] - 10;
        }
        if ($start < 0) {
            $start = 0;
        }
        $count = 10;
        if (isset($_GET['count'])) {
            $count = escape($_GET['count']);
        }
        if ($count > $revisionrow['MAX'] - $start + 1) {
            $count = $revisionrow['MAX'] - $start + 1;
        }
        $query = "SELECT article_revision,article_updatetime,user_id FROM `article_contentbak` where page_modulecomponentid = '{$this->moduleComponentId}' ORDER BY article_revision LIMIT {$start},{$count}";
        $result = mysql_query($query);
        $revisionTable = "<fieldset>\n\t\t\t\t\t        <legend><a name='revisions'>{$ICONS['Page Revisions']['small']}Page Revisions : </a></legend>" . "<table border='1'><tr><td>Revision Number</td><td>Date Updated</td><td>User Fullname</td><td>User Email</td></tr>";
        while ($row = mysql_fetch_assoc($result)) {
            $revisionTable .= "<tr><td><a href=\"./+edit&version=" . $row['article_revision'] . "#preview\">" . $row['article_revision'] . "</a></td><td>" . $row['article_updatetime'] . "</td><td>" . getUserFullName($row['user_id']) . "</td><td>" . getUserEmail($row['user_id']) . "</td></tr>";
        }
        $revisionTable .= "</table>" . "<input type=\"button\" value=\"<<\" onclick=\"window.location='./+edit&revisionno=0'\" /> " . "<input type=\"button\" value=\"<\" onclick=\"window.location='./+edit&revisionno=" . ($start - 10) . "'\" /> " . "<input type=\"button\" value=\">\" onclick=\"window.location='./+edit&revisionno=" . ($start + 10) . "'\" /> " . "<input type=\"button\" value=\">>\" onclick=\"window.location='./+edit&revisionno=" . ($revisionrow['MAX'] - 10) . "'\" /> " . "</fieldset>";
        /* Drafts available */
        $draftquery = "SELECT MAX(draft_number) AS MAX FROM `article_draft` where page_modulecomponentid = '{$this->moduleComponentId}'";
        $draftresult = mysql_query($draftquery);
        $draftrow = mysql_fetch_assoc($draftresult);
        $dstart = $draftrow['MAX'] - 10;
        if (isset($_GET['draftno'])) {
            $dstart = escape($_GET['draftno']);
        }
        if ($dstart > $draftrow['MAX'] - 9) {
            $dstart = $draftrow['MAX'] - 10;
        }
        if ($dstart < 0) {
            $dstart = 0;
        }
        $dcount = 10;
        if (isset($_GET['dcount'])) {
            $dcount = escape($_GET['dcount']);
        }
        if ($dcount > $draftrow['MAX'] - $dstart + 1) {
            $dcount = $draftrow['MAX'] - $dstart + 1;
        }
        $query = "SELECT `draft_lastsaved`,`draft_number`,`user_id` FROM `article_draft` where `page_modulecomponentid` = '{$this->moduleComponentId}' ORDER BY `draft_lastsaved` LIMIT {$dstart},{$dcount}";
        $result = mysql_query($query);
        $draftTable = "<fieldset>\n\t\t\t\t\t        <legend><a name='drafts'>{$ICONS['Page Revisions']['small']}Drafts Saved : </a></legend>" . "<table border='1'><tr><td>Draft Number</td><td>Date Drafted</td><td>User Fullname</td><td>User Email</td><td>Delete</td></tr>";
        while ($row = mysql_fetch_assoc($result)) {
            $draftTable .= "<tr><td><a href=\"./+edit&dversion=" . $row['draft_number'] . "#preview\">" . $row['draft_number'] . "</a></td><td>" . $row['draft_lastsaved'] . "</td><td>" . getUserFullName($row['user_id']) . "</td><td>" . getUserEmail($row['user_id']) . "</td><td><form action='./+edit&deldraft=yes&dno=" . $row['draft_number'] . "' method='post'><input type='button' value='Delete' onclick='submitarticleformDeldraft(this);'></form>\n\t\t<script language='javascript'>\n\t\t\t\t\t    \tfunction submitarticleformDeldraft(butt) {\n\t\t\t\t\t   \t\tif(confirm('Are you sure you want to delete this draft ? '))\n\t\t\t\t\t    \t\tbutt.form.submit();\n\t\t\t\t\t    \t}\n\t\t</script></td></tr>";
        }
        $draftTable .= "</table>" . "<input type=\"button\" value=\"<<\" onclick=\"window.location='./+edit&draftnno=0'\" /> " . "<input type=\"button\" value=\"<\" onclick=\"window.location='./+edit&draftno=" . ($dstart - 10) . "'\" /> " . "<input type=\"button\" value=\">\" onclick=\"window.location='./+edit&draftno=" . ($dstart + 10) . "'\" /> " . "<input type=\"button\" value=\">>\" onclick=\"window.location='./+edit&draftno=" . ($draftrow['MAX'] - 10) . "'\" /> " . "</fieldset>";
        /* Drafts end*/
        return $CkForm . $Ckbody . $CkFooter . $draftTable . $top . $revisionTable . $top;
    }
Example #16
0
        $display_heure = $tab_classe_ev[$id_classe]["heure_evenement"];
    } else {
        // Il est plus facile de voir ce qui n'est pas encore rempli/défini.
        //$display_heure=$heure_courante;
        $display_heure = "";
    }
    echo "\n\t\t\t\t\t\t\t\t\t\t<tr id='div_ligne_{$id_classe}' onmouseover=\"this.style.backgroundColor='white'\" onmouseout=\"this.style.backgroundColor=''\">\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<span style='display:none' title='Pour le tri.'>" . $classe['classe'] . "</span>\n\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"id_classe_" . $id_classe . "\" name=\"id_classe[{$cpt}]\" value=\"{$id_classe}\" " . (array_key_exists($id_classe, $tab_classe_ev) ? " checked" : "") . " onchange=\"modif_affichage_ligne_classe({$id_classe});changement();\" /><label for='id_classe_" . $id_classe . "' id='texte_id_classe_" . $id_classe . "' style='cursor: pointer;'>" . $classe['classe'] . "</label>\n\t\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span style='display:none' title='Pour le tri.'>" . (isset($tab_classe_ev[$id_classe]['date_evenement']) ? $tab_classe_ev[$id_classe]['date_evenement'] : "") . "</span>\n\t\t\t\t\t\t\t\t\t\t\t<span id='span_date_id_classe_" . $id_classe . "'>\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='text' name='display_date_id_classe[{$cpt}]' id='display_date_id_classe_" . $id_classe . "' size='10' value=\"" . (isset($tab_classe_ev[$id_classe]['date_evenement_formatee']) ? $tab_classe_ev[$id_classe]['date_evenement_formatee'] : "") . "\" onKeyDown=\"clavier_date(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t\t\t\t\t\t\t\t" . img_calendrier_js("display_date_id_classe_" . $id_classe, "img_bouton_display_date_id_classe_" . $id_classe) . "\n\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span id='js_copier_date_" . $id_classe . "' style='display:none;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='radio' name = 'copier_date' id= 'copier_date_" . $id_classe . "' value = \"" . $id_classe . "\" /><label for='copier_date_" . $id_classe . "'><img src='../images/icons/copy-16.png' class='icone16' title=\"Copier la date associée à cette classe.\"/></label>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span id='js_coller_date_" . $id_classe . "' style='display:none;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href='#' onclick=\"coller_date({$id_classe});return false;\" id='js_coller_{$cpt}'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img src='../images/icons/coller_23x24.png' class='icone16' title=\"Coller la date sélectionnée.\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\n\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t&nbsp;à&nbsp;\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span id='span_heure_id_classe_" . $id_classe . "'>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='text' name = 'display_heure_id_classe[" . $cpt . "]' id= 'display_heure_id_classe_" . $id_classe . "' size='5' value = \"" . $display_heure . "\" onKeyDown=\"clavier_heure(this.id,event);\" AutoComplete=\"off\" />\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span id='js_copier_heure_" . $id_classe . "' style='display:none;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type='radio' name = 'copier_heure' id= 'copier_heure_" . $id_classe . "' value = \"" . $id_classe . "\" /><label for='copier_heure_" . $id_classe . "'><img src='../images/icons/copy-16.png' class='icone16' title=\"Copier l'heure associée à cette classe.\"/></label>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t<span id='js_coller_heure_" . $id_classe . "' style='display:none;'>\n\t\t\t\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t\t\t\t<a href='#' onclick=\"coller_heure({$id_classe});return false;\" id='js_coller_{$cpt}'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img src='../images/icons/coller_23x24.png' class='icone16' title=\"Coller l'heure sélectionnée.\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</tr>";
    if (!array_key_exists($id_classe, $tab_classe_ev)) {
        $tab_champs_date_a_cacher[] = $id_classe;
    }
    $cpt++;
}
echo "\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>";
echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Texte affiché avant les dates :</i>";
$oCKeditor = new CKeditor('../ckeditor/');
$oCKeditor->editor('texte_avant', $texte_avant);
echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Texte affiché après les dates :</i>";
$oCKeditor2 = new CKeditor('../ckeditor/');
$oCKeditor2->editor('texte_apres', $texte_apres);
echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\" align=\"center\"> \n\t\t\t\t\t\t\t\t<input type='hidden' name='ok' value='y' />\n\t\t\t\t\t\t\t\t<noscript>\n\t\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"Enregistrer\" style=\"font-variant: small-caps;\" name=\"button_ok_sans_javascript\" />\n\t\t\t\t\t\t\t\t</noscript>\n\t\t\t\t\t\t\t\t<input type=\"button\" value=\"Enregistrer\" style=\"font-variant: small-caps;\" name=\"button_ok_avec_javascript\" onclick=\"check_et_valide_form()\" />\n\t\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\t\tfunction checkdate (m, d, y) {\n\t\t\t\t\t\t\t\t\t    // Returns true(1) if it is a valid date in gregorian calendar  \n\t\t\t\t\t\t\t\t\t    // \n\t\t\t\t\t\t\t\t\t    // version: 1109.2015\n\t\t\t\t\t\t\t\t\t    // discuss at: http://phpjs.org/functions/checkdate    \n\t\t\t\t\t\t\t\t\t    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n\t\t\t\t\t\t\t\t\t    // +   improved by: Pyerre\n\t\t\t\t\t\t\t\t\t    // +   improved by: Theriault\n\t\t\t\t\t\t\t\t\t    // *     example 1: checkdate(12, 31, 2000);\n\t\t\t\t\t\t\t\t\t    // *     returns 1: true    // *     example 2: checkdate(2, 29, 2001);\n\t\t\t\t\t\t\t\t\t    // *     returns 2: false\n\t\t\t\t\t\t\t\t\t    // *     example 3: checkdate(3, 31, 2008);\n\t\t\t\t\t\t\t\t\t    // *     returns 3: true\n\t\t\t\t\t\t\t\t\t    // *     example 4: checkdate(1, 390, 2000);    \n\t\t\t\t\t\t\t\t\t    // *     returns 4: false\n\t\t\t\t\t\t\t\t\t    return m > 0 && m < 13 && y > 2000 && y < 32768 && d > 0 && d <= (new Date(y, m, 0)).getDate();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tfunction check_et_valide_form() {\n\t\t\t\t\t\t\t\t\t\tdisplay_date_debut=document.getElementById('display_date_debut').value;\n\n\t\t\t\t\t\t\t\t\t\ttmp=display_date_debut.split('/');\n\t\t\t\t\t\t\t\t\t\tjour_debut=tmp[0];\n\t\t\t\t\t\t\t\t\t\tmois_debut=tmp[1];\n\t\t\t\t\t\t\t\t\t\tannee_debut=tmp[2];\n\t\t\t\t\t\t\t\t\t\tif(!checkdate(mois_debut,jour_debut,annee_debut)) {\n\t\t\t\t\t\t\t\t\t\t\talert('La date de début d\\'affichage est invalide.');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tdocument.formulaire_saisie_evenement.submit();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t" . (isset($id_ev) ? "<input type=\"submit\" value=\"Annuler\" style=\"font-variant: small-caps;\" name=\"cancel\" />" : "") . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t</td>\n\t</tr>\n</table>\n\n<script type='text/javascript'>\n\n" . js_checkbox_change_style('checkbox_change', 'texte_', 'n') . "\n\n\tcheckbox_change('type_autre');\n\tcheckbox_change('type_conseil_de_classe');\n\tcheckbox_change('destinataire_prof');\n\tcheckbox_change('destinataire_cpe');\n\tcheckbox_change('destinataire_scol');\n\tcheckbox_change('destinataire_resp');\n\tcheckbox_change('destinataire_ele');\n\n\tfunction modif_affichage_ligne_classe(id_classe) {\n\t\tcheckbox_change('id_classe_'+id_classe);\n\n\t\tif(document.getElementById('id_classe_'+id_classe).checked==true) {\n\t\t\tdocument.getElementById('span_date_id_classe_'+id_classe).style.display=''\n\t\t\tdocument.getElementById('span_heure_id_classe_'+id_classe).style.display=''\n\t\t\tdocument.getElementById('js_copier_date_'+id_classe).style.display='';\n\t\t\tdocument.getElementById('js_coller_date_'+id_classe).style.display='';\n\t\t\tdocument.getElementById('js_copier_heure_'+id_classe).style.display='';\n\t\t\tdocument.getElementById('js_coller_heure_'+id_classe).style.display='';\n\t\t}\n\t\telse {\n\t\t\tdocument.getElementById('span_date_id_classe_'+id_classe).style.display='none'\n\t\t\tdocument.getElementById('span_heure_id_classe_'+id_classe).style.display='none'\n\t\t\tdocument.getElementById('js_copier_date_'+id_classe).style.display='none';\n\t\t\tdocument.getElementById('js_coller_date_'+id_classe).style.display='none';\n\t\t\tdocument.getElementById('js_copier_heure_'+id_classe).style.display='none';\n\t\t\tdocument.getElementById('js_coller_heure_'+id_classe).style.display='none';\n\t\t}\n\t\t//changement();\n\t}\n";
foreach ($tab_classe as $id_classe => $classe) {
    echo "\n\tcheckbox_change('id_classe_" . $id_classe . "');\n\tmodif_affichage_ligne_classe({$id_classe});";
}
for ($loop = 0; $loop < count($tab_champs_date_a_cacher); $loop++) {
    echo "\n\tdocument.getElementById('span_date_id_classe_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\tdocument.getElementById('span_heure_id_classe_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\tdocument.getElementById('js_copier_date_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\tdocument.getElementById('js_coller_date_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\tdocument.getElementById('js_copier_heure_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\tdocument.getElementById('js_coller_heure_" . $tab_champs_date_a_cacher[$loop] . "').style.display='none';\n\t";
}
echo "\n\n\tfunction coller_date(id_classe) {\n\t\tradio_copier_date=document.formulaire_saisie_evenement.copier_date;\n\t\tfor(i=0;i<radio_copier_date.length;i++) {\n\t\t\tif (radio_copier_date[i].checked) {\n\t\t\t\tdocument.getElementById('display_date_id_classe_'+id_classe).value=document.getElementById('display_date_id_classe_'+radio_copier_date[i].value).value;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction coller_heure(id_classe) {\n\t\tradio_copier_heure=document.formulaire_saisie_evenement.copier_heure;\n\t\tfor(i=0;i<radio_copier_heure.length;i++) {\n\t\t\tif (radio_copier_heure[i].checked) {\n\t\t\t\tdocument.getElementById('display_heure_id_classe_'+id_classe).value=document.getElementById('display_heure_id_classe_'+radio_copier_heure[i].value).value;\n\t\t\t}\n\t\t}\n\t}\n\n</script>\n";
// Fin de la colonne de droite
echo "</td></tr></table>\n";
echo "<p style='color:red'>A FAIRE : Pouvoir dupliquer un événement (par exemple pour un affichage un peu différent selon les statuts destinataires.)</p>";
require "../lib/footer.inc.php";
Example #17
0
        echo "<h3 class='gepi' align='center'>Fiche d'information : " . $gepiSettings['denomination_eleves'] . "</h3>\n";
        echo "<p>Cette fiche est imprimée lors de la création d'un nouvel utilisateur au statut 'eleve'.</p>\n";
        echo "<p>Nombre de fiches à imprimer par page : \n";
        echo "<select name='nb_impression_eleve' size='1'>\n";
        for ($i = 1; $i < 25; $i++) {
            echo "<option value='{$i}'";
            if ($nb_impression_eleve == $i) {
                echo " SELECTED";
            }
            echo ">{$i}</option>\n";
        }
        echo "</select>\n";
        echo "<input type=\"hidden\" name=\"fiche\" value=\"{$fiche}\" />\n";
        echo "<br />Conseil : faites des tests pour éviter de mauvaises surprises lors de l'impression en masse.</p>\n";
        echo "<br /><i>Mise en forme du message :</i>\n";
        $oCKeditor = new CKeditor('../ckeditor/');
        $oCKeditor->editor('impression_eleveFCK', $impression_eleve);
        //echo "</div>\n";
        break;
}
echo "<input type='submit' name=\"ok\" value='Enregistrer' />\n";
echo "<br /><br />\n";
echo "<b><a href=\"./modele_fiche_information.php?fiche={$fiche}\" target='_blank' >Aperçu de la fiche d'information</a></b><br />\n";
echo "<i>Attention&nbsp;:</i> la mise en page des fiches est très différente à l'écran et à l'impression.";
echo "Veillez à utiliser la fonction \"aperçu avant impression\" afin de vous rendre compte du résultat.<br />\n";
//echo "</td>\n</tr>\n";
//echo "</table>\n";
echo "</div>\n";
if ($fiche == "responsables") {
    echo "<br />\n";
    echo "<p><b>ATTENTION&nbsp;:</b> Les dimensions et positionnement du bloc adresse des responsables sont ceux du ";
Example #18
0
            }
        }
    }
    $display_date_debut = formate_date($date_debut);
    $ligne_input_id_ev = "";
    if (isset($id_ev)) {
        $ligne_input_id_ev = "\n\t\t\t\t\t<input type=\"hidden\" name=\"id_ev\" value=\"{$id_ev}\" />";
    }
    echo "\n\t\t\t<form action=\"" . $_SERVER['PHP_SELF'] . "#debut_de_page\" method=\"post\" style=\"width: 100%;\" name=\"formulaire_saisie_evenement\">\n\t\t\t\t<fieldset style='border: 1px solid grey; background-image: url(\"../images/background/opacite50.png\");'>\n\t\t\t\t\t" . add_token_field() . $ligne_input_id_ev . "\n\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"evenement\" />\n\n\t\t\t\t\t<table border=\"0\" width = \"100%\" cellspacing=\"1\" cellpadding=\"1\" >\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<span class='grand'>" . $titre_mess . " \n\t\t\t\t\t\t\t\t<!--a href=\"#\" onclick='return false;' onmouseover=\"afficher_div('aide','y',100,100);\" onmouseout=\"cacher_div('aide');\"><img src='../images/icons/ico_ampoule.png' width='15' height='25' /></a-->\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Type de l'événement&nbsp;:</i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type='radio' name='type' id='type_conseil_de_classe' value='conseil_de_classe' onchange=\"checkbox_change('type_conseil_de_classe');checkbox_change('type_autre');changement();\" " . ($type == "conseil_de_classe" ? "checked " : "") . "/><label for='type_conseil_de_classe' id='texte_type_conseil_de_classe'>Conseil de classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type='radio' name='type' id='type_autre' value='autre' onchange=\"checkbox_change('type_conseil_de_classe');checkbox_change('type_autre');changement();\" " . ($type != "conseil_de_classe" ? "checked " : "") . "/><label for='type_autre' id='texte_type_autre'>Autre</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<p><i>L'événement sera affiché à compter de la date&nbsp;: \n\t\t\t\t\t\t\t\t<input type='text' name='display_date_debut' id='display_date_debut' size='10' value=\"" . $display_date_debut . "\" onKeyDown=\"clavier_date(this.id,event);\" onchange='changement()' AutoComplete=\"off\" />\n\t\t\t\t\t\t\t\t" . img_calendrier_js("display_date_debut", "img_bouton_display_date_debut") . "<br />\n\t\t\t\t\t\t\t\t(<span style='font-size:small'>Respectez le format jj/mm/aaaa</span>)</p>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Statut(s) des destinataires de l'événement&nbsp;:</i>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style='vertical-align:top'>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"destinataire_prof\" name=\"destinataire_prof\" value=\"y\" " . ($destinataire_prof == "y" ? " checked" : "") . " onchange=\"checkbox_change('destinataire_prof');changement();\" /><label for='destinataire_prof' id='texte_destinataire_prof' style='cursor: pointer;'>Professeurs de la classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"destinataire_cpe\" name=\"destinataire_cpe\" value=\"y\" " . ($destinataire_cpe == "y" ? " checked" : "") . " onchange=\"checkbox_change('destinataire_cpe');changement();\" /><label for='destinataire_cpe' id='texte_destinataire_cpe' style='cursor: pointer;'>CPE de la classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"destinataire_scol\" name=\"destinataire_scol\" value=\"y\" " . ($destinataire_scol == "y" ? " checked" : "") . " onchange=\"checkbox_change('destinataire_scol');changement();\" /><label for='destinataire_scol' id='texte_destinataire_scol' style='cursor: pointer;'>Comptes scolarité associés à la classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"destinataire_resp\" name=\"destinataire_resp\" value=\"y\" " . ($destinataire_resp == "y" ? " checked" : "") . " onchange=\"checkbox_change('destinataire_resp');changement();\" /><label for='destinataire_resp' id='texte_destinataire_resp' style='cursor: pointer;'>Responsables d'élèves de la classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"destinataire_ele\" name=\"destinataire_ele\" value=\"y\" " . ($destinataire_ele == "y" ? " checked" : "") . " onchange=\"checkbox_change('destinataire_ele');changement();\" /><label for='destinataire_ele' id='texte_destinataire_ele' style='cursor: pointer;'>Élèves de la classe</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='4'>\n\t\t\t\t\t\t\t\t<p style='margin-top:1em;'>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i>Texte affiché avant les dates :</i>";
    $oCKeditor = new CKeditor('../ckeditor/');
    $oCKeditor->editor('texte_avant', $texte_avant);
    echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Texte affiché après les dates :</i>";
    $oCKeditor2 = new CKeditor('../ckeditor/');
    $oCKeditor2->editor('texte_apres', $texte_apres);
    echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"4\">\n\t\t\t\t\t\t\t\t<i>Texte affiché après les dates pour les élèves et responsables<br />(<em>sous réserve qu'ils soient concernés par cet événement</em>)&nbsp;:</i>";
    $oCKeditor3 = new CKeditor('../ckeditor/');
    $oCKeditor3->editor('texte_apres_ele_resp', $texte_apres_ele_resp);
    echo "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\n\t\t\t\t\t<input type='hidden' name='ok' value='y' />\n\t\t\t\t\t<noscript>\n\t\t\t\t\t\t<input type=\"submit\" value=\"Enregistrer\" style=\"font-variant: small-caps;\" name=\"button_ok_sans_javascript\" />\n\t\t\t\t\t</noscript>\n\t\t\t\t\t<input type=\"button\" value=\"Enregistrer\" style=\"font-variant: small-caps;\" name=\"button_ok_avec_javascript\" onclick=\"check_et_valide_form()\" />\n\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\tfunction checkdate (m, d, y) {\n\t\t\t\t\t\t    // Returns true(1) if it is a valid date in gregorian calendar  \n\t\t\t\t\t\t    // \n\t\t\t\t\t\t    // version: 1109.2015\n\t\t\t\t\t\t    // discuss at: http://phpjs.org/functions/checkdate    \n\t\t\t\t\t\t    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n\t\t\t\t\t\t    // +   improved by: Pyerre\n\t\t\t\t\t\t    // +   improved by: Theriault\n\t\t\t\t\t\t    // *     example 1: checkdate(12, 31, 2000);\n\t\t\t\t\t\t    // *     returns 1: true    // *     example 2: checkdate(2, 29, 2001);\n\t\t\t\t\t\t    // *     returns 2: false\n\t\t\t\t\t\t    // *     example 3: checkdate(3, 31, 2008);\n\t\t\t\t\t\t    // *     returns 3: true\n\t\t\t\t\t\t    // *     example 4: checkdate(1, 390, 2000);    \n\t\t\t\t\t\t    // *     returns 4: false\n\t\t\t\t\t\t    return m > 0 && m < 13 && y > 2000 && y < 32768 && d > 0 && d <= (new Date(y, m, 0)).getDate();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfunction check_et_valide_form() {\n\t\t\t\t\t\t\tvalider_le_submit='y';\n\n\t\t\t\t\t\t\tdisplay_date_debut=document.getElementById('display_date_debut').value;\n\n\t\t\t\t\t\t\ttmp=display_date_debut.split('/');\n\t\t\t\t\t\t\tjour_debut=tmp[0];\n\t\t\t\t\t\t\tmois_debut=tmp[1];\n\t\t\t\t\t\t\tannee_debut=tmp[2];\n\t\t\t\t\t\t\tif(!checkdate(mois_debut,jour_debut,annee_debut)) {\n\t\t\t\t\t\t\t\talert('La date de début d\\'affichage est invalide.');\n\t\t\t\t\t\t\t\tvalider_le_submit='n';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif((document.getElementById('destinataire_cpe').checked==false)&&\n\t\t\t\t\t\t\t(document.getElementById('destinataire_prof').checked==false)&&\n\t\t\t\t\t\t\t(document.getElementById('destinataire_scol').checked==false)&&\n\t\t\t\t\t\t\t(document.getElementById('destinataire_ele').checked==false)&&\n\t\t\t\t\t\t\t(document.getElementById('destinataire_resp').checked==false))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\talert('Aucun destinataire n\\'a été coché.');\n\t\t\t\t\t\t\t\tvalider_le_submit='n';\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t// JE NE TROUVE PAS COMMENT CONTROLER QUE LE CONTENU DU TEXTAREA CKEDITOR EST NON VIDE\n\t\t\t\t\t\t\tif(document.getElementById('texte_avant').value=='') {\n\t\t\t\t\t\t\t\talert('Le texte_avant ne peut pas être vide.');\n\t\t\t\t\t\t\t\tvalider_le_submit='n';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\talert(CKEDITOR.instances['texte_avant'].name);\n\n\t\t\t\t\t\t\talert(CKEDITOR.instances['texte_avant'].getValue());\n\n\t\t\t\t\t\t\talert(CKEDITOR.instances['texte_avant'].value);\n\t\t\t\t\t\t\tCKEDITOR.instances['texte_avant'].updateElement();\n\t\t\t\t\t\t\talert(CKEDITOR.instances['texte_avant'].value);\n\t\t\t\t\t\t\talert(CKEDITOR.instances['texte_avant'].getData());\n\t\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t\tif(valider_le_submit=='y') {\n\t\t\t\t\t\t\t\tdocument.formulaire_saisie_evenement.submit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t</script>\n\t\t\t\t\t" . (isset($id_ev) ? "<input type=\"submit\" value=\"Annuler\" style=\"font-variant: small-caps;\" name=\"cancel\" />" : "") . "\n\t\t\t\t</fieldset>\n\t\t\t</form>";
} elseif (isset($mode) && $mode == "ajouts") {
    // Liens d'ajouts
    echo "\n\t<p><a href='" . $_SERVER['PHP_SELF'] . "?id_ev={$id_ev}&amp;mode=modif_ev'>Modifier la date de début, les destinataires</a><br />\n\t\t<a href='" . $_SERVER['PHP_SELF'] . "?id_ev={$id_ev}&amp;mode=positionner'>Positionner les classes sur les dates et lieux.</a>\n\t</p>\n\n\t<form action=\"" . $_SERVER['PHP_SELF'] . "#debut_de_page\" method=\"post\" style=\"width: 100%;\" name=\"formulaire_saisie_evenement\">\n\t\t<fieldset style='border: 1px solid grey; background-image: url(\"../images/background/opacite50.png\");'>\n\t\t\t" . add_token_field() . "\n\n\t\t\t<input type=\"hidden\" name=\"id_ev\" value=\"{$id_ev}\" />\n\t\t\t<input type=\"hidden\" name=\"mode\" value=\"positionner\" />";
    echo affiche_details_evenement($id_ev, "y");
    echo "<p class='bold' style='margin-top:1em;'>Ajout de dates, classes et lieux pour  l'événement n°" . $id_ev . "</p>";
    // Il faudrait pointer les dates déjà définies, avec classe associée... pour en interdire la suppression.
    // Idem pour les lieux
    $chaine_js_classes_deja = "";
    $sql = "SELECT DISTINCT d.id_classe, c.classe FROM d_dates_evenements_classes d, classes c WHERE id_ev='{$id_ev}' AND c.id=d.id_classe ORDER BY c.classe;";
    $res = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res) > 0) {
        echo "<p>La ou les classes suivantes sont déjà associées à l'événement n°{$id_ev}&nbsp;: <strong>";
        $cpt = 0;
Example #19
0
 *
 * You should have received a copy of the GNU lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Requirements:
 * The CK-Editor have to be installed and configured. The Editor itself is
 * not includet to this extension.
 *
 * This extension have to be installed into:
 * <Yii-Application>/proected/extensions/ckeditor
 *
 * Usage:
 * see-> readme.txt
 */
require_once $ckEditor;
//$oCKeditor = new CKeditor(get_class($model).'['.$attribute.']');
$oCKeditor = new CKeditor('cketext');
$oCKeditor->basePath = $ckBasePath;
if (isset($config) && is_array($config)) {
    foreach ($config as $key => $value) {
        $oCKeditor->config[$key] = $value;
    }
}
//CKEDITOR.replace( 'editor1',
//    {
//        filebrowserBrowseUrl : '/browser/browse.php',
//        filebrowserUploadUrl : '/uploader/upload.php'
//    });
//$oCKeditor->replace(get_class($model).'['.$attribute.']', array(
$oCKeditor->replace('cketext', array('filebrowserBrowseUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/ckfinder.html', 'filebrowserImageBrowseUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/ckfinder.html?Type=Images', 'filebrowserFlashBrowseUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/ckfinder.html?Type=Flash', 'filebrowserUploadUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', 'filebrowserImageUploadUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', 'filebrowserFlashUploadUrl' => Yii::app()->baseUrl . '/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'));
//$oCKeditor->editor('cketext',$defaultValue);
Example #20
0
      <input type="text" id="idSeq" name="titresequence" value="" />
      <label for="idGroupe">Enseignement concern&eacute;</label>
      ' . $aff_select_groups . '
    </p>';
    $ts = date("U");
    for ($a = 0; $a < $_POST['nbre_sequences']; $a++) {
        echo '
<div style="border:2px solid gray;padding: 5px 5px 5px 5px;background-color:' . $color_fond_notices["c"] . ';">
  <p>
    <label for="idCR' . $a . '" style="font-weight: bold;color: red;">Compte-rendu ' . ($a + 1) . '</label> -
    <label for="idDate' . $a . '">Date</label>
    <input type="text" id="idDate' . $a . '" name="dateseance[' . $a . ']" value="' . date("d/m/Y", $ts) . '" size="12" onKeyDown="clavier_date(this.id,event);" AutoComplete="off" />';
        echo img_calendrier_js("idDate" . $a, "img_bouton_idDate" . $a);
        echo '
  </p>

  <p>';
        $oCKeditor = new CKeditor('../ckeditor/');
        $oCKeditor->editor('cr[' . $a . ']', '');
        echo '</p>
</div>
<br />';
        $ts = $ts + 86400;
    }
    echo ' <p>
    <input type="submit" name="enregistrer" value="Enregistrer" />
  </p>';
}
?>
</form></div>
Example #21
0
}
echo "</td>\n";
echo "<td>\n";
if (isset($edit_devoir)) {
    echo "<a title=\"Aller au jour précédent\" href=\"index.php?edit_devoir=yes&amp;year={$yy}&amp;month={$ym}&amp;day={$yd}&amp;id_groupe=" . $current_group["id"] . "\">&lt;&lt;</a></td><td align=center><a href=\"index.php?edit_devoir=yes&amp;id_groupe=" . $current_group["id"] . "&amp;id_matiere={$id_matiere}\">Aujourd'hui</a></td><td align=right><a title=\"Aller au jour suivant\" href=\"index.php?edit_devoir=yes&amp;year={$ty}&amp;month={$tm}&amp;day={$td}&amp;id_groupe=" . $current_group["id"] . "&amp;id_matiere={$id_matiere}\">&gt;&gt;</a>\n";
} else {
    echo "<a title=\"Aller au jour précédent\" href=\"index.php?year={$yy}&amp;month={$ym}&amp;day={$yd}&amp;id_groupe=" . $current_group["id"] . "\">&lt;&lt;</a></td><td align=center><a href=\"index.php?id_groupe=" . $current_group["id"] . "\">Aujourd'hui</a></td><td align=right><a title=\"Aller au jour suivant\" href=\"index.php?year={$ty}&amp;month={$tm}&amp;day={$td}&amp;id_groupe=" . $current_group["id"] . "&amp;id_matiere={$id_matiere}\">&gt;&gt;</a>\n";
}
echo "</td>\n";
echo "</tr>\n";
echo "\n";
?>
<tr><td colspan="4">
<?php 
// lancement de CKeditor
$oCKeditor = new CKeditor('../ckeditor/');
$oCKeditor->editor('notes', $contenu);
//echo "<a href=\"#\" onclick=\"javascript: document.getElementById('notes').value='TRUC'; return false;\">CLIC</a>";
//echo "<a href=\"#\" onclick=\"javascript: alert(document.getElementById('notes').value); return false;\">CLOC</a>";
// gestion des fichiers attachés
echo '<div style="border-style:solid; border-width:1px; border-color: ' . $couleur_bord_tableau_notice . '; background-color: ' . $couleur_cellule[$type_couleur] . ';  padding: 2px; margin: 2px;">
<b>Fichier(s) attaché(s) : </b><br />' . "\n";
echo '<div id="div_fichier">' . "\n";
if (isset($edit_devoir)) {
    $architecture = "/documents/cl_dev" . $current_group["id"];
} else {
    $architecture = "/documents/cl" . $current_group["id"];
}
if (isset($id_ct)) {
    //echo "AAA id_ct=$id_ct<br />";
    // Recherche de documents joints