예제 #1
0
function explodeCatz($filename)
{
    $dir = dirname($filename);
    $f = file($filename);
    while (list($index, $line) = each($f)) {
        $line = trim($line);
        if (empty($line)) {
            continue;
        }
        if (sex($line)) {
            $sex[] = $line;
            unset($f[$index]);
            continue;
        }
        if (mixed_adult($line)) {
            $mixed[] = $line;
            unset($f[$index]);
            continue;
        }
        if (gamble($line)) {
            $gamble[] = $line;
            unset($f[$index]);
            continue;
        }
        if (games($line)) {
            $games[] = $line;
            unset($f[$index]);
            continue;
        }
        if (radio($line)) {
            $radio[] = $line;
            unset($f[$index]);
            continue;
        }
        if (music($line)) {
            $music[] = $line;
            unset($f[$index]);
            continue;
        }
        if (webtv($line)) {
            $webtv[] = $line;
            unset($f[$index]);
            continue;
        }
        if (movies($line)) {
            $movies[] = $line;
            unset($f[$index]);
            continue;
        }
    }
    @file_put_contents($filename, @implode($f));
    @file_put_contents("{$dir}/" . time() . ".music.txt", @implode("\n", $music));
    @file_put_contents("{$dir}/" . time() . ".radio.txt", @implode("\n", $radio));
    @file_put_contents("{$dir}/" . time() . ".sex.txt", @implode("\n", $sex));
    @file_put_contents("{$dir}/" . time() . ".movies.txt", @implode("\n", $movies));
    @file_put_contents("{$dir}/" . time() . ".games.txt", @implode("\n", $games));
    @file_put_contents("{$dir}/" . time() . ".webtv.txt", @implode("\n", $webtv));
    @file_put_contents("{$dir}/" . time() . ".gamble.txt", @implode("\n", $gamble));
    @file_put_contents("{$dir}/" . time() . ".mixed_adult.txt", @implode("\n", $mixed));
}
예제 #2
0
 function getHtmlTag($class = "")
 {
     $html = "\n\t\t\t\t\t<ul class=\"radios_group {$class}\" style=\"width: " . (count($this->list_code) * 51 + 10 + 14) . "px;\">\n\t\t\t\t\t\t<li style=\"width: 10px;\" class=\"select_all_none\"></li>";
     foreach ($this->list_code as $code) {
         $html .= "\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t" . radio("img", $this->id, $code, __($this->en_name) . __(":") . " " . __($code), __($this->en_name) . __(":") . " " . __($code)) . "\n\t\t\t\t\t\t\t</li>";
     }
     $html .= "\n\t\t\t\t\t</ul>";
     return $html;
 }
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le contact client choisi puis validez';
    } else {
        $legende = 'Nouveau contact client';
        $_POST['ARCHIVE'] = 0;
    }
    return creerFieldset($legende, array(select('Client :', 'CLIENT', donner_liste('CLIENT', 'CLI'), 3, 3), input('Nom du contact* :', 'NOM', 3, 3, true), sautLigne(), input('Prénom du contact* :', 'PRENOM', 3, 3, true), input('E-mail du contact* :', 'EMAIL', 3, 3, true), sautLigne(), input('Portable du contact* :', 'PRT', 3, 3, true), select('Fonction du contact* :', 'FONCTION', array('' => '') + donner_liste('FONCTION', 'FCT'), 3, 3, false), sautLigne(), radio('Etat du contact :', 'ARCHIVE', 'Archivé', 'Encours', 3, 1, 2), sautLigne(), input('Commentaire :', 'COMMENTAIRE', 3, 3)));
}
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le fournisseur choisi puis validez';
    } else {
        $legende = 'Nouveau fournisseur';
        $_POST['ARCHIVE'] = 0;
    }
    return creerFieldset($legende, array(input('Code fournisseur* :', 'CODE', 3, 3, true), input('Nom du fournisseur* :', 'NOM', 3, 3, true, 'text'), sautLigne(), input('Date de d�but de collaboration* :', 'DTCREATION', 3, 3, true, 'date'), radio('Etat du fournisseur :', 'ARCHIVE', 'Archiv�', 'Encours', 3, 1, 2)));
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un collaborateur interne
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le collaborateur externe choisi puis validez';
        //$mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true, 'hidden');
    } else {
        $legende = 'Nouveau collaborateur externe';
        //$mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true, 'hidden');
    }
    return creerFieldset($legende, array(select('Civilité :', 'CIVILITE', array('M.' => 'M.', 'Mme.' => 'Mme.', 'Mlle.' => 'Mlle.'), 3, 3), input('Prénom* :', 'PRENOM', 3, 3, true), sautLigne(), input('Nom* :', 'NOM', 3, 3, true), input('Nom de jeune fille :', 'NOMJEUNEFILLE', 3, 3), sautLigne(), radio('Etat :', 'ETAT', 'Actif', 'Inactif', 3, 1, 1), inputMNEMO('Mnémonique* :', 'MNEMONIC', 3, 3, 'offset1'), '<span id="txtHint"></span>', sautLigne(), input('Numéro de téléphone :', 'TEL', 3, 3), input('Numéro de téléphone portable* :', 'PRT', 3, 3, true), sautLigne(), input('E-mail :', 'EMAIL', 3, 3), select('Fournisseur* :', 'FOURNISSEUR', donner_liste('fournisseur', 'FOU'), 3, 3), sautLigne(), radio('Archiver :', 'ARCHIVE', 'Oui', 'Non  ', 3, 1, 1)));
}
/**
 * Fiddle with the article's category selects
 */
function wet_article_partial_category_1($rs)
{
    static $cats = null;
    if ($cats == null) {
        $cats = getTree('root', 'article');
    }
    // Make radio buttons, not drop-downs
    $out = array();
    if ($cats) {
        foreach ($cats as $c) {
            $c = doSpecial($c);
            $id = 'wet_cat-' . $c['name'];
            $out[] = radio('Category1', $c['name'], $rs['Category1'] == $c['name'] ? '1' : '', 'cat-' . $c['name']) . "<label for='{$id}'>{$c['title']}</label>";
        }
    }
    return '<ul class="plain-list"><li>' . join('</li><li>', $out) . '</li></ul>';
}
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un collaborateur interne
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $mailApsa = input('Email Apsaroke :', 'EMAILAPSA', 3, 3, true);
    } else {
        $mailApsa = '';
    }
    $retour = creerFieldset('Identité :', array(select('Civilité :', 'CIVILITE', array('M.' => 'M.', 'Mme.' => 'Mme.', 'Mlle.' => 'Mlle.'), 3, 3), input('Prénom* :', 'PRENOM', 3, 3, true), sautLigne(), input('Nom* :', 'NOM', 3, 3, true), input('Nom de jeune fille :', 'NOMJEUNEFILLE', 3, 3), sautLigne(), inputMNEMO('Mnémonique* :', 'MNEMONIC', 3, 3), '<span id="txtHint"></span>'));
    $retour .= creerFieldset('Coordonnées :', array(input('Adresse* :', 'ADRESSE', 3, 3, true), input('Adresse 2 :', 'ADRESSE2', 3, 3), sautLigne(), input('Code postal* :', 'CP', 3, 3, true), input('Ville* :', 'VILLE', 3, 3, true), sautLigne(), input('Numéro de téléphone :', 'TEL', 3, 3), input('Numéro de téléphone portable* :', 'PRT', 3, 3, true), sautLigne(), input('E-mail :', 'EMAIL', 3, 3), $mailApsa));
    $retour .= creerFieldset('Informations Complémentaires :', array(input('N° de sécurité sociale :', 'NSS', 3, 3), input('Date de naissance* :', 'DTNAISSANCE', 3, 3, true, 'date'), sautLigne(), input('Lieu de naissance* :', 'LIEUNAISSANCE', 3, 3, true), input('Nationalité :', 'NATIONALITE', 3, 3)));
    $retour .= creerFieldset('Détails :', array(input('Date d\'entrée* :', 'DTENTREE', 3, 3, true, 'date'), input('Date de départ :', 'DTDEPART', 3, 3, false, 'date'), sautLigne(), select('Fonction :', 'FONCTION', array('' => '') + donner_liste('FONCTION', 'FCT'), 3, 3, false), input('Statut :', 'STATUT', 3, 3), sautLigne(), input('Coefficient :', 'COEFF', 3, 3), input('Position :', 'POSITION', 3, 3), sautLigne(), input('Type de contrat :', 'TYPECONTRAT', 3, 3), input('Type d\'horaire :', 'TYPEHORAIRE', 3, 3), sautLigne(), input('Rémunération fixe :', 'REMUNFIXE', 3, 3), input('Rémunération variable :', 'REMUNVAR', 3, 3), sautLigne(), input('Frais journaliers :', 'FRAIS', 3, 3), sautLigne(), radio('Etat :', 'ETAT', 'Actif', 'Inactif', 3, 1, 1), '<div class="span1"></div>', radio('Archiver :', 'ARCHIVE', 'Oui', 'Non  ', 3, 1, 1), '<div class="span1"></div>', sautLigne(), radio('Tickets restaurants :', 'TR', 'Oui', 'Non', 3, 1, 1), sautLigne(), radio('Période d\'essai :', 'PERIODEESSAI', 'Oui', 'Non', 3, 1, 1), '<div class="span1">&nbsp;</div>', radio('Prolongation de la période d\'essai :', 'PPE', 'Oui', 'Non', 3, 1, 1)));
    $retour .= creerFieldset('Informations bancaires :', array(input('Nom de la banque :', 'NOMBANQUE', 3, 3), input('IBAN :', 'IBAN', 3, 3), sautLigne(), input('BIC :', 'BIC', 3, 3)));
    $retour .= creerFieldset('Spécification collaborateur', array(radio('Facturable :', 'FACTURABLE', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Coût GSM :', 'GSM', 3, 3), sautLigne(), radio('Treizième mois :', 'TREIZIEME', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Coût PEE mensuel :', 'PEE', 3, 3), sautLigne(), radio('Prime variable :', 'PART_VARI', 'Oui', 'Non', 3, 1, 0), '<div class="span1"></div>', input('Prime d\'ancienneté :', 'PRIME_ANCI', 3, 3)));
    if ($_SESSION['accreditation'] < 2) {
        $retour .= creerFieldset('Accréditation :', array(select('Accréditation :', 'TAUNO', array('' => '') + donner_liste('TYPE_AUTORISATION', 'TAU'), 3, 3, false)));
    }
    return $retour;
}
 public static function filterItemForm($html, $inputNameStem, $value, $options, $record, $element)
 {
     //TODO: grab the stored data about terms and build up the array for each Element
     $controlledVocabs = get_db()->getTable('ControlledVocab_Term')->findByCollectionAndElementForSelect($record->collection_id, $element->id);
     $taOptions = array('rows' => '2', 'cols' => '50');
     $html .= __v()->formTextarea($inputNameStem . '[text]', $value, $taOptions);
     if (count($controlledVocabs) != 0) {
         $html .= "<br/>";
         $html .= "<div class='controlled-vocab-vocabs'>";
         $html .= "<h3 class='controlled-vocab-heading'>Controlled Vocabularies</h3>";
         $html .= radio(array('class' => 'controlled-vocab-vocabs', 'onchange' => 'ControlledVocab.showTerms(event)', 'name' => 'controlled-vocab-radio-' . $inputNameStem), array_keys($controlledVocabs), null, null);
         $vocabCount = 0;
         foreach ($controlledVocabs as $vocab => $termPairs) {
             //have to do inline style to make jQuery play nicely with hiding and showing.
             $html .= select(array('name' => 'controlled-vocab-select-' . $inputNameStem . '-' . $vocabCount, 'class' => 'controlled-vocab-terms', 'style' => 'display:none;', 'onchange' => 'ControlledVocab.updateField(event)'), $termPairs, null);
             $vocabCount++;
         }
         $html .= "</div><div class='controlled-vocab-clear'></div>";
     }
     return $html;
 }
/**
 * affiche le formulaire correspondant à l'ajout ou à la modification d'un projet
 * @param bool $modification
 */
function afficherFormulaire($modification = false)
{
    if ($modification) {
        $legende = 'Modifiez le projet choisi puis validez';
        $cloture = sautLigne() . radio('Etat du projet :', 'ARCHIVE', 'Archivé', 'Encours', 2, 1, 2) . '<div class="span1"></div>';
        $dtcloture = input('Date de cloture :', 'DTCLOTURE', 3, 3, false, 'date');
        //$mission = sautLigne() . afficher('<b>MISSION</b>', '', 'span2', 'span3');
        $mission = 'MISSION';
    } else {
        $legende = 'Nouveau projet';
        $cloture = '';
        $dtcloture = '';
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    if ($_POST['action'] == 'creer') {
        //$mission = sautLigne() . afficher('<b>Nouvelle MISSION</b>', '', 'span2', 'span3');
        $mission = 'Nouvelle MISSION';
    }
    $retour = creerFieldset($legende, array(select('Client :', 'CLIENT', array() + donner_liste('CLIENT', 'CLI'), 3, 3, true), input('Nom du projet :', 'NOM', 3, 3, true), sautLigne(), select('Contact client :', 'CTC', array() + donner_liste('CONTACT_CLIENT', 'CTC'), 3, 3, false), select('Contact fournisseur (si il y en a un) :', 'CTF', array('' => '') + donner_liste('CONTACT_FOURNISSEUR', 'CTF'), 3, 3, false), sautLigne(), input('Date de démarrage :', 'DTDEBUT', 3, 3, true, 'date'), input('Numéro de cde du projet :', 'NUMCMDE', 3, 3, true), sautLigne(), select('Collaborateur :', 'COL', array() + donner_liste('COLLABORATEUR', 'COL'), 3, 3, false), select('Projet suivi par :', 'SUIVIPAR', array() + donner_liste('COMMERCIAL', 'COL'), 3, 3, false), sautLigne(), input('Durée prévisionnelle (jours) :', 'NBJOURS', 3, 3, false), input('Date de fin prévue :', 'DTFINPREVUE', 3, 3, false, 'date'), sautLigne(), textarea('Détails :', 'DETAIL', 3, 8, true, 1, 80, 'textarea800'), sautLigne(), textarea('Modalités :', 'MODALITE', 3, 8, false, 4, 80, 'textarea800'), $cloture, $dtcloture, input('', 'NO', 2, 3, true, 'hidden')));
    // Partie mission
    $retour .= creerFieldset($mission, array(input('Nom de la mission :', 'MISNOM', 3, 3, true), sautLigne(), input('Numéro de cde :', 'MISNUMCMDE', 3, 3, true), input('Date de cde :', 'MISDATECMDE', 3, 3, true, 'date'), sautLigne(), input('Début de mission :', 'MISDTDEBUT', 3, 3, true, 'date'), input('Fin de mission :', 'MISDTFIN', 3, 3, true, 'date'), sautLigne(), input('Durée prévisionnelle (jours) :', 'MISNBJOURS', 3, 3, false), sautLigne(), radio('Forfait :', 'MISFORFAIT', 'Oui', 'Non', 3, 1, 1), '<div class="span1"></div>', input('Montant du forfait :', 'MISMONTFORFAIT', 3, 3, false), sautLigne(), input('Taux journalier :', 'MISTJM', 3, 3, false), input('Prix d\'achat :', 'MISPA', 3, 3, false), sautLigne(), textarea('Commentaire :', 'MISCOMMENTAIRE', 3, 8, false, 4, 80, 'textarea800'), input('', 'MISORDRE', 2, 3, false, 'hidden'), input('', 'MISNSEQUENTIEL', 2, 3, false, 'hidden'), input('', 'MISNO', 2, 3, false, 'hidden'), input('', 'PRONO', 2, 3, false, 'hidden'), input('', 'idmission', 2, 3, false, 'hidden'), input('', 'action', 2, 3, false, 'hidden')));
    ob_start();
    ?>
<script>
    $(document).ready(function() {
        $('[name="DETAIL"]').css('width', '800px');
        $('[name="NOM"]').change(function(){
            $('[name="MISNOM"]').val($('[name="NOM"]').val());
        });
        $('[name="NUMCMDE"]').change(function(){
            $('[name="MISNUMCMDE"]').val($('[name="NUMCMDE"]').val());
        });
    });
</script>
        <?php 
    $retour .= ob_get_contents();
    ob_end_clean();
    return $retour;
}
예제 #10
0
         $tab_com[$row_comm['COM_NO']][$row_comm['COM_TEXTE']][$row_comm['ABS_ETAT']][] = $row_comm['ABS_JOUR'];
     }
     $query = "SELECT * FROM ABSENCE WHERE ABS_NO IN (" . implode(', ', $tab_abs_no) . ") AND ABS_ETAT = 1 ORDER BY ABS_JOUR";
     $result = $GLOBALS['connexion']->query($query);
     if (mysqli_num_rows($result) > 0) {
         $affiche = true;
     }
     while ($row = $result->fetch_assoc()) {
         $tab_jour[] = $row['ABS_JOUR'];
     }
 }
 $conges = generer_calendrier($row_coll['COL_NO']);
 if ($abs == false) {
     $tableau = '<tr id ="' . $row_coll['COL_NO'] . '">' . '<td class="nomColl" id="' . $row_coll['COL_NO'] . '">' . $row_coll['COL_NOM'] . '<br />' . $row_coll['COL_PRENOM'] . ' </td>' . '<td class="calendrier">' . $conges['calendrier'] . '</td>' . '<td class="not_printed"></td>' . '<td class="not_printed"></td>';
 } else {
     $tableau = '<tr id ="' . $row_coll['COL_NO'] . '">' . '<td class="nomColl" id="' . $row_coll['COL_NO'] . '">' . $row_coll['COL_NOM'] . '<br />' . $row_coll['COL_PRENOM'] . '</td>' . '<td class="calendrier">' . $conges['calendrier'] . '</td>' . '<td class="not_printed"><strong>Droit aux congés</strong><br />' . radio('droit' . $row_coll['COL_NO'], $droit) . '<br /><strong>Client notifié</strong><br />' . radio('notification' . $row_coll['COL_NO'], $notification) . '<br /></td>';
     $tableau .= '<td class="not_printed"><strong>Etats et commentaires</strong><br />';
     if ($affiche == true) {
         $tableau .= '<strong>Congés acceptés</strong><br />';
         $tableau .= implode(',', $tab_jour) . '<br />';
     }
     foreach ($tab_com as $idcom => $values) {
         foreach ($values as $com => $values1) {
             foreach ($values1 as $etat => $jour) {
                 if ($etat == 2 && $debutSR == true) {
                     $tableau .= '<strong>Congés acceptés sous réserves</strong><br />';
                     $debutSR = false;
                 } elseif ($etat == 3 && $debutR == true) {
                     $tableau .= '<strong>Congés refusés</strong><br />';
                     $debutR = false;
                 }
예제 #11
0
function radio_list($name, $values, $current_val = '', $hilight_val = '')
{
    // $values is an array of value => label pairs
    foreach ($values as $k => $v) {
        $id = $name . '-' . $k;
        $out[] = n . t . '<li class="status-' . $k . ' ' . $v . ($hilight_val == $k ? ' active' : '') . '">' . radio($name, $k, $current_val == $k ? 1 : 0, $id) . '<label for="' . $id . '">' . ($hilight_val == $k ? strong($v) : $v) . '</label></li>';
    }
    return '<ul class="status plain-list">' . join('', $out) . n . '</ul>';
}
예제 #12
0
function status_radio($Status)
{
    global $statuses;
    $Status = !$Status ? 4 : $Status;
    foreach ($statuses as $a => $b) {
        $out[] = radio('Status', $a, $Status == $a ? 1 : 0) . $b;
    }
    return join('<br />' . n, $out);
}
예제 #13
0
             <?php 
radio('subscribe', 0, $subscribe);
?>
 >
                Keep the mail level as low as possible.
        </label>
        <label class="radio">
             <?php 
radio('subscribe', 1, $subscribe);
?>
 >
                Send only announcements.
        </label>
        <label class="radio">
             <?php 
radio('subscribe', 2, $subscribe);
?>
 >
                Send me notification mail for important things like my assignment was graded.
        </label>
      </div>
  </div>
<hr class="hidden-phone"/>
<?php 
if (!$CFG->OFFLINE) {
    ?>
  <hr class="hidden-phone"/>
How would you like to be shown in maps.<br/>
<select name="map">
  <option value="0">--- Please Select ---</option>
  <option <?php 
예제 #14
0
function status_radio($Status)
{
    global $statuses;
    $Status = !$Status ? 4 : $Status;
    foreach ($statuses as $a => $b) {
        $out[] = tag(radio('Status', $a, $Status == $a ? 1 : 0) . $b, 'label');
    }
    return join(br . n, $out);
}
예제 #15
0
function display_languages()
{
    global $table_style, $installed_languages, $dflt_lang, $GetText;
    $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", "");
    $currlang = $_SESSION["language"]->code;
    div_start('lang_tbl');
    start_form();
    //
    // select/display system locales support for sites using native gettext
    //
    if (function_exists('gettext')) {
        if (check_value('DisplayAll')) {
            array_insert($th, 7, _("Supported"));
        }
        start_table();
        check_row(_('Display also languages not supported by server locales'), 'DisplayAll', null, true);
        end_table();
    }
    start_table(TABLESTYLE);
    table_header($th);
    $k = 0;
    // get list of all (available and installed) langauges
    $langs = get_languages_list();
    foreach ($langs as $pkg_name => $lng) {
        if ($lng == 'C') {
            // skip default locale (aka no translation)
            continue;
        }
        $lang = $lng['code'];
        $lang_name = $lng['name'];
        $charset = $lng['encoding'];
        $rtl = @$lng['rtl'] == 'yes' || @$lng['rtl'] === true;
        $available = @$lng['available'];
        $installed = @$lng['version'];
        $id = @$lng['local_id'];
        if ($lang == $currlang) {
            start_row("class='stockmankobg'");
        } else {
            alt_table_row_color($k);
        }
        $support = $GetText->check_support($lang, $charset);
        if (function_exists('gettext') && !$support && !get_post('DisplayAll')) {
            continue;
        }
        label_cell($lang);
        label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name);
        label_cell($charset);
        label_cell($rtl ? _("Yes") : _("No"));
        label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown")));
        label_cell($available ? $available : _("None"));
        label_cell($id === null ? '' : radio(null, 'CurDflt', $id, $dflt_lang == $lang, true), "align='center'");
        if (function_exists('gettext') && check_value('DisplayAll')) {
            label_cell($support ? _("Yes") : _("No"));
        }
        if (!$available && $lang != 'C') {
            // manually installed language
            button_cell('Edit' . $id, _("Edit"), _('Edit non standard language configuration'), ICON_EDIT);
        } elseif (check_pkg_upgrade($installed, $available)) {
            // outdated or not installed language in repo
            button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest language package'), ICON_DOWN);
        } else {
            label_cell('');
        }
        if ($id !== null && $lang != $currlang && $lang != 'C') {
            delete_button_cell('Delete' . $id, _('Delete'));
            submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove language \\'%s\\'.\nDo you want to continue ?"), $lang_name));
        } else {
            label_cell('');
        }
        end_row();
    }
    end_table();
    display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'");
    br();
    submit_center_first('Refresh', _("Update default"), '', null);
    submit_center_last('Add', _("Add new language manually"), '', false);
    end_form();
    div_end();
}
    $query = "SELECT * FROM ABSENCE WHERE COL_NO = '" . $id . "' AND ABS_ANNEE = '" . $_POST['annee'] . "' AND ABS_MOIS = '" . $_POST['mois'] . "' AND ABS_ETAT!=3";
    $result = $GLOBALS['connexion']->query($query);
    while ($row = $result->fetch_assoc()) {
        if ($row['ABS_DROIT'] == '0') {
            $droit = 0;
        } elseif ($row['ABS_DROIT'] == '1') {
            $droit = 1;
        }
        if ($row['ABS_NOTIFICATION'] == '0') {
            $notification = 0;
        } elseif ($row['ABS_NOTIFICATION'] == '1') {
            $notification = 1;
        }
    }
    if ($_SESSION['col_id'] != $id || $_SESSION['accreditation'] == 1) {
        echo '<div class="span3 offset4" style="text-align:center"><strong>Droit aux congés</strong><br />' . radio('droit' . $id, $droit) . '<br /><strong>Client notifié</strong><br />' . radio('notification' . $id, $notification) . '<br /><strong>Commentaire :</strong><br /><textarea style="width:180px;" cols="10" rows="1" class="commentaire" id="commentaire" name="commentaire' . $id . '">' . $commentaire . '</textarea><br/>';
        ?>
                        <button class="btn btn-primary not_printed" type="submit" name="valider">Valider <i class="icon-ok"></i></button>
                        <button class="btn btn-primary not_printed" type="button" name="refuser">Refuser <i class="icon-ban-circle"></i></button>
                        <button class="btn btn-primary not_printed" type="button" onClick="javascript:ImprimeConges();">Imprimer</button>
                        <?php 
        echo '</div>';
    }
}
?>
            </form>
        </div>
        <script type="text/javascript">
            accreditation = <?php 
echo $_SESSION['accreditation'];
?>
예제 #17
0
파일: pop.php 프로젝트: philum/cms
function connectors($doc, $media, $id)
{
    $large = $_SESSION['prma']['content'];
    $largb = round($large * 0.5);
    $xt = strtolower(strrchr($doc, "."));
    $xfp = strrpos($doc, ':');
    $xf = substr($doc, $xfp);
    $pdoc = substr($doc, 0, $xfp);
    if (rstr(70)) {
        $xf = retape_conn($xf, $id);
    }
    //list($d,$p)=good_param($pdoc);
    switch ($xf) {
        case ':no':
            return;
            break;
        case ':br':
            return "\n";
            break;
        case ':u':
            return '<u>' . $pdoc . '</u>';
            break;
        case ':i':
            return '<i>' . $pdoc . '</i>';
            break;
        case ':b':
            return '<b>' . $pdoc . '</b>';
            break;
        case ':h':
            return '<h3>' . $pdoc . '</h3>';
            break;
        case ':h1':
            return '<h1>' . $pdoc . '</h1>';
            break;
        case ':h2':
            return '<h2>' . $pdoc . '</h2>';
            break;
        case ':h4':
            return '<h4>' . $pdoc . '</h4>';
            break;
        case ':e':
            return '<sup>' . $pdoc . '</sup>';
            break;
        case ':l':
            return '<small>' . $pdoc . '</small>';
            break;
        case ':k':
            return '<strike>' . $pdoc . '</strike>';
            break;
        case ':q':
            return '<blockquote>' . $pdoc . '</blockquote>';
            break;
        case ':t':
            return btn("txtit", $pdoc);
            break;
        case ':c':
            return btn("txtclr", $pdoc);
            break;
        case ':s':
            return btn("stabilo", $pdoc);
            break;
        case ':r':
            return pub_clr($pdoc . '§ff0000');
            break;
        case ':code':
            return bal('code', $pdoc);
            break;
        case ':list':
            return make_li($pdoc, 'ul');
            break;
        case ':css':
            return pub_css($pdoc);
            break;
        case ':font':
            return pub_font($pdoc);
            break;
        case ':size':
            return pub_size($pdoc);
            break;
        case ':color':
            return pub_clr($pdoc);
            break;
        case ':html':
            return pub_html($pdoc);
            break;
        case ':pub':
            return pubart($pdoc);
            break;
            //pub
        //pub
        case ':w':
            return lkc('', goodroot($pdoc), $pdoc);
            break;
        case ':read':
            return str_replace('<br />', '', read_msg($pdoc, $media));
            break;
            //read
        //read
        case ':photo':
            return photo_thumbs($pdoc, $id);
            break;
            //gallery
        //gallery
        case ':photo1':
            return gallery_flash($pdoc, $id);
            break;
            //flash
        //flash
        case ':photo2':
            return gallery_j($pdoc, $id);
            break;
            //ajax
        //ajax
        case ':slider':
            return slider($pdoc, $id);
            break;
            //flash
        //flash
        case ':sliderJ':
            return sliderj($pdoc, $id);
            break;
            //ajax
        //ajax
        case ':jukebox':
            return jukebox($pdoc, $media, $id);
            break;
            //jukebox
        //jukebox
        case ':radio':
            return radio($pdoc, $media, $id);
            break;
            //radio
        //radio
        case ':import':
            return import_art($pdoc, $media);
            break;
            //import
        //import
        case ':numlist':
            return make_li($pdoc, 'ol');
            break;
        case ':forum':
            return plugin('forum', $pdoc ? $pdoc : $id);
            break;
            //forum
        //forum
        case ':search':
            return rech_internal($pdoc);
            break;
            //search
        //search
        case ':articles':
            return arts_mod($pdoc, $id);
            break;
            //articles
        //articles
        case ':formail':
            return make_form($pdoc, 'mailform' . $id, '_formail___' . ajx($pdoc, '') . '____');
            break;
            //mail
        //mail
        case ':chat':
            return plugin('chat', $pdoc ? $pdoc : $id, 5);
            break;
            //chat
        //chat
        case ':chatxml':
            return plugin('chatxml', $pdoc ? $pdoc : $id);
            break;
        case ':room':
            return call_plug('', 'popup', 'chatxml', $pdoc, pictxt('chat', $pdoc));
            break;
        case ':shop':
            return plugin('shop', 'shop', $pdoc, $id);
            break;
            //shop
        //shop
        case ':prod':
            return plugin('shop', 'prod', $pdoc, $id);
            break;
            //prod
        //prod
        case ':bkg':
            return mk_bkg($pdoc, $id);
            break;
        case ':draw':
            return plugin('draw');
            break;
        case ':icon':
            return icon($pdoc);
            break;
        case ':center':
            return bal("center", $pdoc);
            break;
        case ':right':
            return divc('" align="right', $pdoc);
            break;
        case ':clear':
            if (is_image($pdoc)) {
                $pdoc = place_image($pdoc, $media, $large, $largb);
            }
            return str_replace('float:left;', '', $pdoc) . "\n\n";
            break;
        case ':table':
            return mk_table($pdoc);
            break;
        case ':divtable':
            return mk_dtable($pdoc);
            break;
        case ':nh':
            if ($media == 'nl') {
                return lka('#nb' . $pdoc . '" name="nh' . $pdoc, $pdoc);
            } else {
                return lj('" name="nh' . $pdoc, 'popup_nbp___' . $pdoc . '_' . $id, $pdoc);
            }
            break;
        case ':nb':
            if ($media != 'nl') {
                $go = urlread($id);
            }
            return lka($go . '#nh' . $pdoc . '" name="nb' . $pdoc, $pdoc);
            break;
            //nbp
        //nbp
        case ':pre':
            return bal("pre", entities($pdoc));
            break;
        case ':php':
            return progcode($pdoc);
            break;
        case ':link':
            return special_link($pdoc);
            break;
        case ':console':
            return divc("console", $pdoc);
            break;
        case ':label':
            return imlabel($pdoc, $large);
            break;
        case ':polaroid':
            return imcomment($pdoc, $large, $largb, $media, $id);
            break;
        case ':scan':
            return scan_txt($pdoc);
            break;
            //fopen_txt
        //fopen_txt
        case ':iframe':
            return iframe($pdoc, '');
            break;
        case ':imgtxt':
            return create_img_txt($pdoc);
            break;
        case ':download':
            return download($pdoc);
            break;
        case ':msql':
            return msqread(msq_goodtable_b($pdoc), $id);
            break;
        case ':microsql':
            return msqread(msq_goodtable($pdoc), $id);
            break;
        case ':microread':
            return microread($pdoc);
            break;
        case ':msq_conn':
            return msqconn($pdoc, $id);
            break;
            //case(':msq_html'):return msqconn($pdoc,$id);break;
        //case(':msq_html'):return msqconn($pdoc,$id);break;
        case ':msq_lasts':
            return msqlasts($pdoc);
            break;
        case ':msq_count':
            return msqcount($pdoc);
            break;
        case ':msq_bin':
            return msqbin($pdoc);
            break;
        case ':msq_graph':
            return msqgraph($pdoc, $media);
            break;
        case ':data':
            return msqdata($pdoc, $id);
            break;
        case ':microform':
            return plugin('microform', $pdoc, $id);
            break;
            break;
        case ':module':
            req('mod');
            return build_mod_r($pdoc);
            break;
        case ':modpop':
            return lj('', 'popup_modpop__3_' . ajx($pdoc), picto('get'));
            break;
        case ':ajxget':
            return ajx($pdoc);
            break;
        case ':ajax':
            return ajxlink($pdoc, randid(), 0, 1);
            break;
        case ':rss_input':
            return rssin($pdoc);
            break;
        case ':twitter':
            return plugin_func('twit', 'twit_build', ajx($pdoc));
            break;
        case ':twitter_cached':
            return twitart($pdoc, $id);
            break;
        case ':poptwit':
            return poptwit($pdoc);
            break;
        case ':last-update':
            return lastup($pdoc, $id);
            break;
        case ':pdf':
            return pdfreader($pdoc);
            break;
        case ':swf':
            return popswf($pdoc);
            break;
        case ':flv':
            return popflv($pdoc, $large);
            break;
        case ':jpg':
            return place_image($pdoc, $media, $large, $largb);
            break;
        case ':img':
            $im = vacuum_image($pdoc . '.jpg', $id);
            return place_image($im, $media, $large, $largb);
            break;
            //img
        //img
        case ':mini':
            if (substr($pdoc, 0, 4) == 'http') {
                return vacuum_image($pdoc, $id);
            }
            return make_mini_b($pdoc, $id);
            break;
            //mini
        //mini
        case ':thumb':
            return make_mini_c($pdoc);
            break;
            //thumb
        //thumb
        case ':video':
            return video_auto($pdoc, $large, $id, $media);
            break;
        case ':popvideo':
            return popvideo($pdoc);
            break;
        case ':poptxt':
            return call_j($pdoc, 'poptxt');
            break;
        case ':popmsqt':
            return call_j($pdoc, 'popmsqt');
            break;
        case ':popmsql':
            return call_j($pdoc, 'popmsql');
            break;
        case ':popread':
            return call_j($pdoc, 'popread');
            break;
        case ':pop':
            return call_pop($pdoc);
            break;
        case ':jopen':
            return jopen($pdoc, 0);
            break;
            //jopen
        //jopen
        case ':jconn':
            return jopen($pdoc, 1);
            break;
            //jconn
        //jconn
        case ':popurl':
            return popurl($pdoc);
            break;
        case ':popart':
            return pop_art($pdoc);
            break;
        case ':rss_art':
            return rss_art($pdoc, 0, 0);
            break;
        case ':rss_read':
            return rss_art($pdoc, 1, 0);
            break;
        case ':webpage':
            return lj('txtbox', 'popup_webpage___' . ajx($pdoc), preplink($pdoc));
            break;
        case ':weburl':
            return weblink($pdoc, 1);
            break;
        case ':web':
            return weblink($pdoc);
            break;
        case ':idart':
            return id_of_suj($pdoc);
            break;
        case ':petition':
            return plugin('petition', $id, 10);
            break;
        case ':book':
            return plugin('book', $pdoc, $id);
            break;
        case ':popbook':
            return plugin('book', $pdoc, 'x');
            break;
        case ':track':
            return tracks_read($pdoc);
            break;
            //case(':eco'):return txarea('',parse($pdoc),44,8); break;
        //case(':eco'):return txarea('',parse($pdoc),44,8); break;
        case ':svg':
            return svg($pdoc);
            break;
        case ':svgcode':
            list($p, $o) = split_one('§', $pdoc, 1);
            return plugin_func('svg', 'svg_j', $p, $o);
            break;
        case ':plug':
            list($p, $o, $conn) = decompact_conn($pdoc);
            return plugin($conn, $p, $o);
            break;
        case ':pluf':
            list($fnc, $plg) = explode('§', $pdoc);
            return plugin_func($plg, $fnc, '');
            break;
        case ':plup':
            list($p, $o, $conn) = decompact_conn($pdoc);
            list($plg, $bt) = split_one("§", $conn, 1);
            return lj('', 'popup_plupin___' . $plg . '_' . ajx($p) . '_' . ajx($o), $bt ? $bt : $plg);
            break;
        case ':openapp':
            list($p, $o, $d) = decompact_conn($pdoc);
            return openapp($d, $p, $o);
            break;
        case ':popapp':
            list($p, $o, $d) = decompact_conn($pdoc);
            return lj('', 'popup_openapp___' . $d, $d);
            break;
        case ':apps':
            return read_apps_link($pdoc);
        case ':bubble':
            return bubble_menus($pdoc, 'inline');
        case ':header':
            Head::add('code', delbr($pdoc, "\n"));
            return;
            break;
        case ':basic':
            list($func, $var) = good_param($pdoc);
            return cbasic($func, $var);
            break;
        case ':bazx':
            return plugin('bazx', $pdoc);
            break;
        case ':version':
            return $_SESSION['philum'];
            break;
        case ':ver':
            $phi = $_SESSION['philum'];
            return substr($phi, 0, 2) . '.' . substr($phi, 2, 2);
            break;
        case ':picto':
            @(list($p, $o) = explode('§', $pdoc));
            return picto($p, $o);
            break;
        case ':on':
            return '[' . $pdoc . ']';
            break;
    }
    if ($doc == '--') {
        return hr();
    }
    //hr
    if (is_image($doc) && strpos($doc, '§') === false && strpos($doc, '<') === false) {
        //images
        if (substr($d, 0, 4) == 'http' && !$_GET['callj']) {
            $doc = vacuum_image($doc, $id);
        }
        return place_image($doc, $media, $large, $largb);
    }
    if (strpos($doc, "¬") !== false) {
        return mk_dtable($doc);
    }
    //tables
    if ($xt == ".mp3") {
        return audio(goodroot($doc), $id);
    }
    //mp3
    if ($xt == ".mp4") {
        return video_html(goodroot($doc));
    }
    //mp4
    if ($xt == ".pdf") {
        return pdfdoc($doc, $media, $large);
    }
    //pdf
    if ($xt == ".svg") {
        list($p, $w, $h) = subparams($doc);
        return image($p, $w, $h);
    }
    //svf
    if ($xt == ".flv") {
        return jwplayer($doc, $large);
    }
    //flv
    if ($xt == ".swf") {
        return flash_prep($doc, '');
    }
    //swf
    if ($xt == ".txt") {
        $doc = goodroot($doc);
        return lkt('', $doc, strrchr($doc, "/"));
    }
    if ($xt == ".gz") {
        return download($doc);
    }
    //tar
    if ($xt && $xt != ".") {
        //video
        if (strpos('.ogg.mp4.m4a.mov.mpg.wmv.h264.aac', $xt) !== false) {
            if ($media != 3) {
                return lj('txtx', 'popup_popvideo___' . ajx($doc), pictxt('video', strrchr_b($doc, "/")));
            }
            if ($xt == '.mp4' or $xt == '.m4a' or $xt == '.mov') {
                return jwplayer($doc, round($large * (3 / 4)));
            }
        }
    }
    if (substr($pdoc, 0, 1) == '@') {
        return poptwit(substr($pdoc, 1));
    }
    //liens
    if ((strpos($doc, '§') !== false or strpos($doc, 'http') !== false or strpos($doc, '@') !== false) && strpos($doc, '<a href') === false) {
        $lk = prepdlink($doc);
        if (is_image($lk[0])) {
            //link2image§text
            if (substr($lk[0], 0, 4) == 'http') {
                $lk[0] = vacuum_image($lk[0], $id);
            }
            if (substr($lk[1], 0, 4) == 'http') {
                $lk[1] = lkt('', $lk[1], preplink($lk[1]));
            }
            if (is_image($lk[1])) {
                return popim(goodroot($lk[0]), image(goodroot($lk[1])), $id);
            }
            //mini
            //return place_image($lk[0],$media,$large,$largb,$lk[1],'');
            return popim(goodroot($lk[0], 1), $lk[1]);
        } elseif (is_image($lk[1])) {
            //link§image
            if (substr($lk[1], 0, 4) == 'http') {
                $lk[1] = vacuum_image($lk[1], $id);
            }
            if (strpos($lk[0], '.pdf') !== false) {
                return pdfdoc($doc, $media, $large);
            }
            if (is_numeric($lk[0])) {
                $lk[0] = urlread($lk[0]);
            }
            return lkc('', $lk[0], place_image($lk[1], $media, $large, $largb, '', ''));
        } elseif (substr($lk[0], 0, 4) == 'http') {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], '<img') !== false) {
            return $lk[0] . divc('blocktext', $lk[1]);
        } elseif (strpos($lk[1], '<img') !== false) {
            return $lk[0] . ' ' . $lk[1];
        } elseif (substr($lk[0], 0, 1) == '/') {
            return lka($lk[0], $lk[1]);
        } elseif (strpos($lk[0], '/') !== false) {
            return lkc('', goodroot($lk[0]), $lk[1]);
        } elseif (strpos($lk[0], '.pdf') !== false) {
            return pdfdoc($doc, $media, $large);
        } elseif (substr($lk[0], 0, 1) == '#') {
            list($lien, $name) = explode('-', $lk[0]);
            return lka($lien . '" name="' . $name, $lk[1]);
        } elseif (strpos($lk[0], '@') !== false && strpos($lk[0], ".") !== false) {
            return lka('mailto:' . $lk[0], $lk[1] ? $lk[1] : $lk[0]);
        } elseif (substr($doc, 0, 1) == '@' && ($tw = substr($doc, 1))) {
            return call_plug('', 'popup', 'twitter', ajx($tw), $doc);
        } elseif (is_numeric($lk[0])) {
            return jread('', $lk[0], $lk[1]);
        }
    }
    //cols
    if (substr($xf, 0, 2) == ":/") {
        $nb = substr($xf, 2);
        if (is_numeric($nb)) {
            $nw = $large / $nb - 5;
            if ($media < 3) {
                return $pdoc;
            } else {
                return divs('float:left; width:' . $nw . 'px; padding-right:5px;', $pdoc);
            }
        }
    }
    if (substr($xf, 2) == "cols" && $media > 2) {
        $nb = substr($xf, 1, 2);
        if ($media < 3) {
            return $pdoc;
        } else {
            return paocols($pdoc, $nb, 0);
        }
    }
    //codeline_join
    $xxf = substr($xf, 1);
    $clvr = sesmk('clvars');
    if ($clvr[$xxf]) {
        $rb = decompact_conn($doc);
        return codeline($rb[0], $rb[1], $rb[2]);
    }
    //user_conn
    $is = strpos($xf, ':') !== false ? 1 : 0;
    if ($xxf && $is && $xxf != 'stop' && $xxf != 'attr' && $xxf != 'rect' && $xxf != 'defs') {
        $func = msql_read('', ses('qb') . '_connectors', $xxf);
        if (!$func) {
            $func = msql_read('', 'public_connectors', $xxf);
        }
        if ($func && !is_array($func)) {
            return cbasic($func, $pdoc);
        }
        //plugin
        if (isplug($xxf)) {
            list($p, $o) = explode('§', $pdoc);
            $ret = plugin($xxf, $p, $o);
        }
        if ($ret) {
            return delbr($ret, "\n");
        }
    }
    return '[' . $doc . ']';
}
예제 #18
0
    <?php 
echo input('segundo_nombre', 'Segundo nombre', $vals);
?>
    <?php 
echo input('paterno', 'Apellido paterno', $vals);
?>
    <?php 
echo input('materno', 'Apellido materno', $vals);
?>
  </div>
  <div class="fl" style="width:49%">
    <?php 
echo input('email', 'Email', $vals);
?>
    <?php 
echo radio('tipo', 'Tipo', $vals['tipo'], $this->Usuario_model->tipos);
?>
  </div>

  <div style="clear:both"></div>
  <fieldset id="materias" style="display:none">
    <legend>Seleccione materias</legend>
    <ul class="half">
      <?php 
foreach ($materias->result() as $materia) {
    ?>
      <?php 
    $val = false;
    if (isset($vals['materias']) && in_array($materia->id, $vals['materias'])) {
        $val = true;
    }
예제 #19
0
" placeholder="科目" title="科目" />
		<input type="text" name="account[type]" value="<?php 
echo $this->value('account/type');
?>
" placeholder="类型" title="类型" />
		<select name="account[received]">
			<?php 
echo options(array(0 => '预计', 1 => '实际'), $account['received'], '预计/实际', true);
?>
		</select>
		<label>¥<input type="text" name="account[amount]" value="<?php 
echo abs($this->value('account/amount'));
?>
" placeholder="数额" title="数额" /></label>
		<?php 
echo radio(array('in' => '入', 'out' => '出'), 'account[way]', $this->value('account/amount') >= 0 ? 'in' : 'out', true);
?>
		<input type="text" name="account[date]" value="<?php 
echo $this->value('account/date');
?>
" class="date" placeholder="日期" title="日期" />
		<input type="text" name="account[account]" value="<?php 
echo $this->value('account/account');
?>
" placeholder="账目编号" title="账目编号" />
	</div>
	
	<div class="item">
		<div class="title"><label>项目 付款/收款人:</label></div>
		<select name="account[project]" class="chosen allow-new" data-placeholder="项目">
			<?php 
예제 #20
0
/**
 * Generates a list of radio buttons wrapped in a unordered list.
 *
 * @param  string       $name        The field
 * @param  array        $values      The values as an array array( $value => $label )
 * @param  string       $current_val The selected option. Takes a value from $value
 * @param  string       $hilight_val The highlighted list item
 * @param  string|array $atts        HTML attributes
 * @return string       HTML
 */
function radio_list($name, $values, $current_val = '', $hilight_val = '', $atts = array('class' => 'plain-list'))
{
    foreach ($values as $value => $label) {
        $id = $name . '-' . $value;
        $class = 'status-' . $value;
        if ((string) $value === (string) $hilight_val) {
            $label = strong($label);
            $class .= ' active';
        }
        $out[] = tag(radio($name, $value, (string) $current_val === (string) $value, $id) . n . tag($label, 'label', array('for' => $id)), 'li', array('class' => $class));
    }
    return tag(n . join(n, $out) . n, 'ul', $atts);
}
예제 #21
0
파일: dcs.php 프로젝트: muthulatha/iem
        echo "</table>";
        echo "</div></div>";
    }
    // End of rotation
    echo "</div>";
    echo "<div id=\"field{$field}_ctabs\">\n  <ul>\n  <li><a href=\"#field{$field}_ctabs1\">Cover Crop One</a></li>\n  <li><a href=\"#field{$field}_ctabs2\">Cover Crop Two</a></li>\n  <li><a href=\"#field{$field}_ctabs3\">Cover Crop Three</a></li>\n  </ul>";
    for ($cover = 1; $cover < 4; $cover++) {
        echo "<div id='field{$field}_ctabs{$cover}' style='background: url(DataCollectionSheet_files/cover{$cover}.png) repeat-y;'>";
        echo "<div style='margin: 25px;'>";
        echo "<table><tr>";
        echo tdgen("Cover Crop Type", "field{$field}cover{$cover}type", 30);
        echo tdgen("Year", "field{$field}cover{$cover}year", 6);
        echo "</tr></table>";
        echo "<table><tr>";
        echo tdgen("Seeding rate (per acre)", "field{$field}cover{$cover}seedrate", 10);
        echo "<th>Units:</th><td>" . radio("field{$field}cover{$cover}seedunits", array("seeds_per_acre" => "seeds per acre", "lbs_per_acre" => "lbs. per acre")) . "</td>";
        echo "</tr><tr>";
        echo tdgen("Planting equipment", "field{$field}cover{$cover}plantequip", 15);
        echo tdgen("Date", "field{$field}cover{$cover}plantdate", 10);
        echo "</tr><tr>";
        echo tdgen("Termination practice (e.g., herbicide)", "field{$field}cover{$cover}termination", 30);
        echo tdgen("Date", "field{$field}cover{$cover}termdate", 10);
        echo "</tr><tr>";
        echo tdgen("Yield (if applicable)", "field{$field}cover{$cover}yield", 10);
        echo "</tr></table>";
        echo "</div></div>";
    }
    // End of cover
    echo "</div></div></div>";
}
// End of field loop
예제 #22
0
    <?php 
echo input('login', 'Usuario');
?>
    <?php 
echo input('password', 'Contraseña');
?>
    <?php 
echo input('password_confirmation', 'Confirmación contraseña');
?>
    <?php 
echo input('email', 'Email');
?>

    <?php 
echo radio('tipo', 'Tipo', '', $this->Usuario_model->tipos);
?>

  </div>

  <div style="clear:both"></div>
  <div style="clear:both"></div>

  <fieldset id="materias" style="display:none">
    <legend>Seleccione materias</legend>
    <ul class="half">
      <?php 
foreach ($materias->result() as $materia) {
    ?>
      <?php 
    $val = false;
예제 #23
0
            /*Arreglo para guardar las opciones*/
            $opciones = array();
            while ($row = $statement->fetch()) {
                /*print $row['IdPregunta']."<br>";													
                  print $row['ValorAlternativa']."<br>";		
                  print $row['Tipo']."<br>";	*/
                $tipo_multiple = $row['Tipo'];
                array_push($opciones, $row['ValorAlternativa']);
            }
            //print "Numero de opciones: ".count($opciones);
            /*Cargar las distintos tipos multiples*/
            if ($tipo_multiple == 'LISTA') {
                lista($id_pregunta, $enunciado, $opciones, $modo);
            }
            if ($tipo_multiple == 'RADIO') {
                radio($id_pregunta, $enunciado, $opciones, $modo);
            }
            if ($tipo_multiple == 'CHECKBOX') {
                checkbox($id_pregunta, $enunciado, $opciones, $modo);
            }
            unset($opciones);
            //Eliminos las opciones guardadas ya usadas
            //print "Numero de opciones: ".count($opciones);
            break;
        default:
            print "No existe el tipo";
            break;
    }
}
if ($modo == 'CREAR' || $modo == 'EDITAR') {
    /*Activar preguntas seleccionadas*/
예제 #24
0
function filemgr($cmd, $stroka, $path, $fileforaction, $mask, $pid)
{
    // is a part filemgr- fileio
    //hidekey ("pid",$pid);
    global $defaultpath, $protect, $prauth, $ADM, $pr, $sd;
    //..,$file
    global $filemgrmod, $daysleft, $codekey, $noscreenmode, $maxmgrs, $OSTYPE, $coreredir;
    global $multiaction, $scriptpath, $scriptpath;
    if ($codekey == 4) {
        needupgrade();
    }
    $file = $fileforaction;
    global $filscheader, $filscdata, $filscplevel, $filsccount, $languageprofile;
    if ($filscdata) {
        if ($filsccount < 1) {
            echo "Filemgr don't have configured scripts<br>";
        } else {
            echo "";
        }
        //additional keys by   filescript.cfg and starting it
        // 4.3.4добавлено: cmsg не отрабатывает теперь значения начинающиеся с точки
        // filescript для генерации кнопок исполнения скриптов ,  заданных администраторами.
        // dbscore - исправлена ошибка из за которой иногда не вычислялся count
        //версия конфигов при создании конфигурации теперь берется из ядра
        //..+++if (!$unauthorized) { //незарегистрированные в любом случае не будут видеть список пользователей ресурса в раздаче.
        // теперь репозитории работать будут раздельно, проприетарная версия будет отличатся только возможностью подключать специальные модули.
        //если вы не планируете их заказывать можно использоватьобычную версию.
        $keylanguage = 1;
        //if not detected;  function detectlanguageidfromheader
        for ($i = 0; $i < 30; $i++) {
            //echo "DEBUG ibane $filscheader[$i],  languageprofile=$languageprofile<br>";
            // echo  "iDEBUG (".substr($filscheader[$i],0,6)."==".substr($languageprofile,0,6).") <br>";
            if (substr($filscheader[$i], 0, 6) == substr($languageprofile, 0, 6)) {
                $keylanguage = $i;
            }
            // теперь хрен открутится, правда ограничились 6 знаками но пофиг , главное ?  не пролезет
            // if (strpos ($filscheader[$i],$languageprofile)) $keylanguage=$i;
            // ну вот почему всегда вместо простой функции приходится городить черт знает что.
            //  if ($filscheader[$i]==$languageprofile) $keylanguage=$i; // придется сделать по дебильному - ибо // что за ? - откуда оно взялось блджад!!!!
        }
        if ($keylanguage == 29) {
            $keylanguage = 1;
        }
        //if
    }
    //..потом добавим проверку на дебильный символ в конце любой строки с утф...вообще бы в парсере как то опознавание глючны файлов сделать
    if ($filscdata) {
        //echo "<br>DEBUG Script:$cmd Key=$keylanguage Lang=$languageprofile Selected=".$filscheader[$keylanguage]."<br>";
        for ($i = 1; $i < $filsccount; $i++) {
            // echo "debug $i = $filscdata[$i][$keylanguage]   , key=[$keylanguage]<br>";
            // plevel checking NOT added!!!!  graphical icon NOT released!  CFG OPT FUTURE disable all scripts not added
            //echo "  if (".$filscdata[$i][$keylanguage]."==$cmd) <br>";
            if ($filscdata[$i][$keylanguage] . $pid === $cmd) {
                $plevelrequired = $filscdata[$i][3];
                $directcommand = $filscdata[$i][2];
                if ($debug) {
                    echo "DEBUG Command= {$directcommand} (rightsreq={$plevelrequired})<br>";
                }
            }
            //path2 redirector?
            if (strlen($directcommand) < 2) {
                continue;
            }
            $massivedynamics = 0;
            if ($debug) {
                echo "DEBUG for (i=1;i<" . strlen($directcommand) . ");{$i}++) {<br>";
            }
            $parsedcommand = $directcommand;
            //echo "здесь должен быть выход ибо сцуко виснет ";
            for ($i = 1; $i < strlen($directcommand) + 5; $i++) {
                $a1 = strpos($directcommand, "%", $i + 0) + 1;
                if ($a1) {
                    $massivedynamics++;
                    $a2 = strpos($directcommand, "%", 0 + $a1 + 1);
                    //this is first   просто это первый , общественный российский.
                    //echo "Try to corrent schetckik -LAAA!!!$i+$a2-1!!!!!!!new $i==$a2!!!!!!!!!!!!!!!!;<br>       ";
                    $oldi = $i;
                    //$i=$i+($a2-1);  почти верно
                    $i = $a2;
                    //echo "old i=$oldi  new i=$i<br>";
                    if ($oldi > $i) {
                        //echo "Logic error, breaking cycling<br>";
                        $i = $oldi;
                        $i = 100500;
                        continue;
                    }
                    $firstcoord[$massivedynamics] = $a1;
                    $lastcoord[$massivedynamics] = $a2;
                    $cut = substr($directcommand, $a1, $a2 - $a1);
                    $cutnow[$massivedynamics] = $cut;
                    $cutwprc = substr($directcommand, $a1 - 1, $a2 - $a1 + 2);
                    $cutwpercent[$massivedynamics] = $cutwprc;
                    $md = $massivedynamics;
                    if ($debug) {
                        echo "DEBUG Parse [{$i}] param=:: f=" . $firstcoord[$md] . " ; a2-l=" . $lastcoord[$md] . ";- is cut=" . $cutnow[$md] . " = %%::<blu>" . $cutwpercent[$md] . "</blu> = <grn>" . ${$cut} . "</grn><br>";
                    }
                    $replaceto = ${$cut};
                    // fukken shit - admin.php?/   а где все остальное?  крап$parsedcommand=str_replace ($parsedcommand, $cutwprc,$replaceto, $count=1);
                    $parsedcommand = str_replace($cutwprc, $replaceto, $parsedcommand, $count = 2);
                }
                //al@al-desktop:/media# mencoder
                //mencoder: relocation error: mencoder: symbol codec_wav_tags, version LIBAVFORMAT_52 not defined in file libavformat.so.52 with link time reference
            }
        }
        if ($debug) {
            echo "DEBUG Parsed command :: {$parsedcommand}<br>";
        }
        if ($parsedcommand) {
            echo " executing (if you enable system () of course )...<br>";
            $x = system($parsedcommand);
            //ping
            $f = fopen("_logs/cmd.log", "w");
            if ($f) {
                fwrite($f, $x);
            }
            fclose($f);
            lprint("5MIN");
            if ($debug) {
                echo "DEBUG {$x}";
            }
        }
        //    ob_flush () ;
        ////exit;
    }
    //echo "ACTION:cmd=$cmd,str ok,path ok,file=$fileforaction,pid=$pid>";// -+++-
    $path = str_replace("\\\\", "\\", $path);
    // проверка на вшивость -
    //$path=str_replace ("/","\\",$path);
    if ($cmd == cmsg("FMG_CPY_F") and $prauth[$ADM][12]) {
        global $path2;
        copy($path . $fileforaction, $path2 . $fileforaction);
        echo "copy({$path}{$fileforaction},{$path2});";
        echo cmsg("CP_END");
    }
    if ($cmd == cmsg("FMG_MOV_F") and $prauth[$ADM][12]) {
        global $path2;
        copy($path . $fileforaction, $path2 . $fileforaction);
        unlink($path . $fileforaction);
        echo cmsg("MOV_END");
    }
    if ($pr[101]) {
        if ($cmd == cmsg("FMG_DOWNLOAD") and $prauth[$ADM][9]) {
            ob_clean();
            $err = sendfile($path . "/" . $fileforaction);
        }
    }
    //костыль, ибо на некоторых тупых компьютерах почему то пропадает косая и соответственно файл скачать невозможно. куда она пропадает никто не знает.
    if ($cmd == cmsg("FMG_DOWNLOAD") and $prauth[$ADM][9]) {
        ob_clean();
        $err = sendfile($path . $fileforaction);
    }
    if ($cmd == cmsg("FMG_UPLOAD") and $prauth[$ADM][36] or $cmd == cmsg("FMG_DUMP_UPLOAD") and $prauth[$ADM][36]) {
        $path = del_endslash($path);
        //	if ($codekey==7) demo ();
        //<input type="hidden" name="MAX_FILE_SIZE" value="8000000000">
        ?>
<form enctype="multipart/form-data" action="filemgr.php" method="post">
	<input name=userfile type=file class=buttonS> <input type=Submit name=go class=buttonS>
	<input type = hidden name = path value ="<?php 
        echo $path;
        ?>
"><?php 
        hidekey("pid", $pid);
        if ($cmd == cmsg("FMG_DUMP_UPLOAD")) {
            echo "Dump loading.<br>";
        }
        echo "</form>";
        hidekey("write", $cmd);
        exit;
        //moved from non-function zone
    }
    //возможно сюда присобачим кнопку удаления из админки точнее ссылки с нее из w.php :)
    //if (($cmd==cmsg("FMG_UNSHARE"))and($prauth[$ADM][36])) {    echo "not implemented";}
    if ($cmd == cmsg("FMG_SHARE") and $prauth[$ADM][36] or $coreredir == "SH_UPDD_FL") {
        $path = del_endslash($path);
        // -- SHARE STEP 1 --
        if ($multiaction) {
            global $filearrcount;
            // 0
            if ($filearrcount > 0) {
                exit;
            }
            // disables FMG_SHARE for cycle executing;  only one action allowed for one or multiaction files.
            global $fileforaction;
            $filearrcount = count($fileforaction);
        }
        // праздник главное вовремя закончить  тогда он ьудет долго помниться как приятное событие
        // multiaction==1  CFG OPT FUTURE  должен добавлять много файлов по идее, однако пока отрабатывается по файлу за раз.
        if ($multiaction) {
            echo "Multiaction mode.  Selected files={$filearrcount}<br>";
        }
        //..if ($multiaction==1) {global $filearrcount;$stroka.=$filearrcount;};
        if (!$multiaction) {
            $file = $path . "/" . $fileforaction;
        }
        if ($multiaction) {
            for ($a = 0; $a < $filearrcount; $a++) {
                $file[$a] = $path . "/" . $fileforaction[$a];
                echo "File {$a}: {$fileforaction[$a]}<br>;";
            }
            $filelistmassive = base64_encode(implode($fileforaction, "¦"));
            //список и число объектов надо передать вместе с multiaction
        }
        //лучше всего массив с файлами передать в виде одной переменной
        if ($coreredir == "SH_UPDD_FL") {
            // maybe
            if (!$multiaction) {
                global $destinationfilename, $filesizeinmb;
                $file = $destinationfilename;
            }
            if ($multiaction) {
                global $destinationfilename, $filesizeinmb;
                echo "SH_UPDD_FL unimplemented<br>";
                echo "I dont know where i take destfilename {$destinationfilename} -- {$file} (file)<bR>";
                //   $file=$destinationfilename;
            }
        }
        ?>
<form enctype="multipart/form-data" action="filemgr.php" method="post"><?php 
        if (!$multiaction) {
            echo "File: {$file}<br>";
        }
        //Sif (!$multiaction) {   echo "File: $file<br>";}
        lprint(GEN_OPT);
        echo "<br>";
        radio("share", "#GENLNK_UNREG", "GENLNK_UNREG");
        echo "<br>";
        radio("share", "FMG_UNSHARE", "FMG_UNSHARE");
        echo "<br>";
        if (!$pr[70]) {
            radio("share", "GENLNK_REG", "GENLNK_REG");
            if ($ADM < 1) {
                lprint("FILE_UNAUTH_NOTE");
            }
            echo "<br>";
            if ($ADM > 0) {
                radio("share", "GEN_PLVL_USR", "GEN_PLVL_USR");
                echo "<select name=groupplevels>";
                for ($a = 0; $a < 10; $a++) {
                    echo "<option>" . $a;
                }
                echo "</select>";
                //if ($ADM<1) lprint ("FILE_UNAUTH_NOTE"); - check unauthorized access
                echo "<br>";
                //незарегистрированные в любом случае не будут видеть список пользователей ресурса в раздаче.
                radio("share", "GENLNK_USR", "GENLNK_USR");
                echo "<br>";
                echo "<select name=\"username[]\" multiple size=15>";
                for ($a = 1; $a < count($prauth); $a++) {
                    echo "<option>" . $prauth[$a][0] . "";
                    $cnt++;
                }
                echo "</select>";
            }
            echo "<br>";
        }
        lprint(COMM);
        inputtext("commfile", 15, $commfile);
        echo "<br>";
        if ($prauth[$ADM][2]) {
            checkbox(1, "yes");
            lprint(GEN_FL_EPX);
        } else {
            hidekey("yes", 1);
        }
        checkbox(1, "srchen");
        lprint(GEN_FILENSRCH);
        echo "<br>";
        if ($coreredir == "SH_UPDD_FL") {
            hidekey("coreredir", "step2");
        }
        if (!$multiaction) {
            hidekey("file", $file);
        }
        if ($multiaction) {
            hidekey("multiactionsign", $multiaction);
            hidekey("file", $filelistmassive);
            $path = add_endslash($path);
            hidekey("pathmulti", base64_encode($path));
            hidekey("filelistmassive", $filelistmassive);
            //посылаем дважды на пробу   и каждый раз нихрена нет почему то  какого ???
            hidekey("filearrcount", $filearrcount);
        }
        submitkey("go", "FMG_SHARE");
        // кнопка раздать файл
        hidekey("pid", $pid);
        ?>
</form>
<?php 
        echo " ";
        hidekey("write", $cmd);
        if ($multiaction == 1) {
            exit;
        }
        //   !
        ////moved from non-function zone -- SHARE STEP 1 -- ENDING
        //ЭТО ОКончание первого шага раздачи
    }
    //
    //	echo "Мы получили из пред сессии  $cmd $fileforaction!<br> <BR>";   ikonki mlya !
    //echo "<br>".cmsg ("FMG_MHLP")."<br>";  ХЕЛП ОТКЛЮЧЕН
    if ($noscreenmode == false) {
        echo "";
    }
    //тут пишем команды и выполняем их
    //echo "628_Failure-- protect::";print_r ($protect); неправильно обрабатывался массив  почему то вместо него шла переменная о_О CFG OPT FUTURE
    if (is_Array($protect)) {
        if (!$prauth[$ADM][38]) {
            $protect[] = "*.php";
        }
    }
    // скрываем файлы скрипта чтобы их никто не стер.
    //$protect[]="*.key";// не снимать комментарий - безопасность снизится до 0
    //if ($OSTYPE=="LINUX") if (($sd[10])AND($ADM==0)) $path=$path."/";  //bug with unregistered users  folder lost /
    //if ($OSTYPE=="WINDOWS") if (($sd[10])AND($ADM==0)) $path=$path."\\";
    if ($OSTYPE == "WINDOWS") {
        if ($cmd == cmsg("FMG_ENTER") and $prauth[$ADM][7]) {
            $path = $path . $fileforaction . "\\";
        }
    }
    if ($OSTYPE == "LINUX") {
        if ($cmd == cmsg("FMG_ENTER") and $prauth[$ADM][7]) {
            $path = $path . $fileforaction . "/";
        }
    }
    if ($OSTYPE == "WINDOWS") {
        if ($cmd == cmsg("FMG_DRV") and $prauth[$ADM][8]) {
            $path = $stroka . ":/";
        }
    }
    if ($OSTYPE == "LINUX") {
        if ($cmd == cmsg("FMG_DRV") and $prauth[$ADM][8]) {
            $path = "/media/{$stroka}/";
        }
    }
    if ($OSTYPE == "LINUXALT") {
        if ($cmd == cmsg("FMG_DRV") and $prauth[$ADM][8]) {
            $path = "/mnt/{$stroka}/";
        }
    }
    //CFG OPT FUTURE
    if ($OSTYPE == "WINDOWS") {
        if ($cmd == cmsg("FMG_EXIT") and $prauth[$ADM][7]) {
            $path = dirname($path) . "\\";
        }
    }
    //$path=folderupdir ($path);
    if ($OSTYPE == "LINUX") {
        if ($cmd == cmsg("FMG_EXIT") and $prauth[$ADM][7]) {
            $path = dirname($path) . "/";
        }
    }
    if ($cmd == cmsg("FMG_SRCH") and $prauth[$ADM][7]) {
        $file = $path . $fileforaction;
        // далее скрипт рассчитан на эту переменную, к томуже массив стереть надо:)
        $a = searchplus($file, $fileforaction, $stroka);
        if ($pr[12]) {
            $act = "FILEMGR_SRCH {$cmd} {$file} word={$stroka}";
            logwrite($act);
        }
        // логируемся
        //if ($a==false) die ("<br>Ошибка!Файл $file не найден!!!.<br>");
        echo " <form action=filemgr.php method=post>";
        hidekey("pid", $pid);
        hidekey("write", $cmd);
        submitkey("cmd" . $pid, "FMG_RESET");
        echo "</form>";
        exit;
    }
    //If ($prauth[$ADM][2]==true) {
    // blocked commands
    if ($cmd == cmsg("FMG_MKDIR") and $prauth[$ADM][12]) {
        //if ($codekey==7) demo ();
        if ($multiaction == 1) {
            global $filearrcount;
            $stroka .= $filearrcount;
        }
        $err = mkdir($path . $stroka);
    }
    //if ($cmd==cmsg("FMG_DELALL")) $err=rmdir ($path.$fileforaction);
    if ($cmd == cmsg("FMG_JOINFIL") and $prauth[$ADM][12]) {
        if ($codekey == 7) {
            demo();
        }
        $err = joinfiles($path, $mask, $protect, $stroka);
    }
    if ($cmd == cmsg("FMG_DELALL") and $prauth[$ADM][13]) {
        // rmdir теперь  полное удаление (!)
        if ($codekey == 7) {
            demo();
        }
        if ($prauth[$ADM][5] == true) {
            if ($stroka == "accept") {
                $err = kill_dir($path . $fileforaction);
            } else {
                echo "Вы не сказали accept";
            }
        } else {
            msgexiterror("notright", "", "disable");
            exit;
        }
        // круто удаляет отключим
    }
    if ($cmd == cmsg("FMG_EXECUTE") and $prauth[$ADM][8]) {
        if ($codekey == 7) {
            demo();
        }
        echo cmsg("FMG_MOD_IN") . "<br>";
        require $filemgrmod;
        echo cmsg("FMG_MOD_OUT") . "<br>";
    }
    if ($OSTYPE == "LINUX") {
        if ($cmd == cmsg("FMG_UNRAR") and $prauth[$ADM][12]) {
            $file = $path . $fileforaction;
            //rar_open rar_list PHP by standart is unsupported!!!
            $unrared = substr($fileforaction, 0, strrpos($fileforaction, '.'));
            // elf  elfkz  удаляем расширение рар
            @mkdir($path . $unrared);
            echo "Creating folder {$unrared}<br>";
            $extractionpoint = $path . $unrared;
            echo "Extracting to " . $extractionpoint . ";<br>";
            $zip = system("unrar x \"{$file}\" \"{$extractionpoint}\"");
            echo "<br>Result={$zip}  ";
            //echo '"unrar e \"'.$file.'\" \"'.$extractionpoint.'\""'; echo " <br>";
        }
    }
    if ($OSTYPE == "LINUX") {
        if ($cmd == cmsg("FMG_RAR") and $prauth[$ADM][12]) {
            $file = $path . $fileforaction;
            //rar_open rar_list PHP by standart is unsupported!!!
            $unrared = substr($fileforaction, 0, strrpos($fileforaction, '.'));
            // elf  elfkz  удаляем расширение рар
            // @mkdir ($path.$unrared);
            // echo "Creating folder $unrared<br>";
            $extractionpoint = $path . $unrared;
            echo "Archiving to  to " . $fileforaction . ".rar;<br>";
            $zip = system("rar a \"{$fileforaction}\".rar \"{$file}\"");
            echo "<br>Result={$zip}  ";
            //echo '"unrar e \"'.$file.'\" \"'.$extractionpoint.'\""'; echo " <br>";
        }
    }
    if ($cmd == cmsg("FMG_UNZIP") and $prauth[$ADM][12]) {
        $file = $path . $fileforaction;
        //rar_open rar_list PHP by standart is unsupported!!!
        $zip = zip_open($file);
        $unrared = substr($fileforaction, 0, strrpos($fileforaction, '.'));
        // elf  elfkz  удаляем расширение рар
        @mkdir($path . $unrared);
        if ($zip) {
            while ($zip_entry = zip_read($zip)) {
                echo "Name: " . zip_entry_name($zip_entry) . "\n";
                echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\n";
                echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\n";
                echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";
                if (zip_entry_open($zip, $zip_entry, "r")) {
                    echo "File Contents:\n";
                    $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
                    //echo "$buf\n";
                    $x = fopen($path . zip_entry_name($zip_entry), "w");
                    @fwrite($x, $buf);
                    @fclose($x);
                    zip_entry_close($zip_entry);
                }
                echo "\n";
            }
            zip_close($zip);
        }
    }
    if ($cmd == cmsg("FMG_TEST")) {
        //at this moment start new script
        echo cmsg("FMG_MOD_IN") . "<br>";
        require "mp3runonce.php";
        echo cmsg("FMG_MOD_OUT") . "<br>";
    }
    if ($cmd == cmsg("FMG_DEL") and $prauth[$ADM][13]) {
        if ($codekey == 7) {
            demo();
        }
        @($err1 = unlink($path . $fileforaction));
        @($err2 = rmdir($path . $fileforaction));
    }
    if ($cmd == cmsg("FMG_NEW") and $prauth[$ADM][12]) {
        //if ($codekey==7) demo ();
        //echo "ibane ug if ($multiaction==1) {global $filearrcount;$stroka.=$filearrcount;};<br>";
        if ($multiaction == 1) {
            global $filearrcount;
            $stroka .= $filearrcount;
        }
        @($err = fopen($path . $stroka, "r"));
        if ($err == false) {
            $err = fopen($path . $stroka, "a");
        }
    }
    if ($cmd == cmsg("FMG_REN") and $prauth[$ADM][12]) {
        if ($codekey == 7) {
            demo();
        }
        if ($multiaction == 1) {
            global $filearrcount;
            $stroka .= $filearrcount;
        }
        $err = rename($path . $fileforaction, $path . $stroka);
    }
    if ($cmd == cmsg("FMG_EDIT") and $prauth[$ADM][12]) {
        if ($codekey == 7) {
            demo();
        }
        $err = simpleedit($path . $fileforaction, $stroka);
    }
    if ($pr[12]) {
        $act = "FILEMGR_CMD {$cmd} {$file}({$path} {$fileforaction}) word={$stroka}";
        if ($cmd) {
            if ($cmd !== cmsg("FMG_ENTER") and $cmd !== cmsg("FMG_EXIT")) {
                logwrite($act);
            }
        }
    }
    // логируемся
    // } else { echo "<br><font color=red id=errfnt>".cmsg ("LIM")."</font>".cmsg ("FMG_HLP2");}
    #selectin files using  fileio.php
    if (!$path or $cmd == cmsg("FMG_RESET")) {
        $path = $defaultpath;
        $mask = "*.*";
        $file = "";
        $stroka = "";
    }
    //$path=str_replace ("//","/",$path);проверка на вшивость -
    if ($err) {
        echo "{$err} <br>";
    }
    //global disables visual menu for executing action
    if (!$multiaction) {
        // start menu show
        // маска для файла может быть поиск по части имени и поиск по формату
        //выделить обращение к директории и режим парсинга (маска)
        //насчет маски - возможно стоит ее добавить в поисковик МЕ
        if ($pid == 1) {
            if ($pr[86]) {
                if ($pr[87] or $prauth[$ADM][7]) {
                    //либо право на чтение у юзера, либо разрешение искать всем.
                    echo "<br><form action=filemgr.php method=post>";
                    lprint("SRCH_FILE");
                    inputtxt("searchfilenew", 30);
                    submitkey("start", "DALEE");
                    echo "</form>";
                    if ($searchfilenew) {
                        echo $searchfilenew;
                    }
                }
            }
        }
        echo "<form action=filemgr.php method=post>";
        hidekey("write", $cmd);
        //выделить отдельно модуль создания меню выбора файла.
        $file = getdirdata($path, $mask, $protect);
        //print_r ($file);
        if ($file) {
            asort($file);
        }
        $dircnt = count($file);
        if ($ADM > 0) {
            echo "<font color=blue>{$path}</font><br>";
        }
        hidekey("pid", $pid);
        // cобственно это и мешает многооконной идее ))   вроде теперь кое-
        for ($a = 1; $a < $maxmgrs + 1; $a++) {
            // save pid data
            $strokaname = "stroka" . $a;
            $pathname = "path" . $a;
            $fileforactionname = "fileforaction" . $a;
            $maskname = "mask" . $a;
            global ${$strokaname}, ${$pathname}, ${$fileforactionname}, ${$maskname};
            ${$pathname} = str_replace("\\\\", "\\", ${$pathname});
            ${$pathname} = str_replace("\\\\", "\\", ${$pathname});
            if ($OSTYPE == "WINDOWS") {
                $path = str_replace("\\\\", "\\", $path);
            }
            // проверка на вшивость -
            if ($OSTYPE == "LINUX") {
                $path = str_replace("\\\\", "\\", $path);
            }
            // проверка на вшивость -xc
            hidekey("stroka" . $a, ${$strokaname});
            hidekey("mask" . $a, ${$maskname});
            hidekey("path" . $a, ${$pathname});
            hidekey("fileforaction" . $a, ${$fileforactionname});
        }
        //lprint ("FMG_CREATE");
        if ($ADM > 0) {
            inputtext("stroka" . $pid, 15, $stroka);
        }
        //<textarea type = text name=stroka<?=$pid  cols= 15 rows=1 wrap=NONE><?=$stroka; </textarea>
        if ($ADM > 0) {
            $hidefolder = $prauth[$ADM][52];
        } else {
            $hidefolder = $pr[73];
        }
        if (!$hidefolder) {
            lprint("FMG_MASK");
            inputtext("mask" . $pid, 15, $mask);
        }
        //<textarea type = text name=mask<?=$pid  cols= 7 rows=1 wrap=NONE><?=$mask; </textarea> <?
        if ($noscreenmode) {
            if ($prauth[$ADM][7]) {
                //FMG.pid удален
                echo "generate cmd{$pid}<br>";
                //$cmdx="cmd".$pid;
                //работает но передает только вторую букву [1] FIXED?
                submitkey("cmd", "FMG_SRCH");
                submitkey("cmd", "FMG_ENTER");
                submitkey("cmd", "FMG_EXIT");
            }
            if ($prauth[$ADM][8]) {
                submitkey("cmd", "FMG_DRV");
                if ($filemgrmod and $prauth[$ADM][2] == true) {
                    submitkey("cmd", "FMG_EXECUTE");
                }
            }
            if ($prauth[$ADM][12]) {
                submitkey("cmd", "FMG_MKDIR");
                submitkey("cmd", "FMG_JOINFIL");
                submitkey("cmd", "FMG_UNZIP");
                submitkey("cmd", "FMG_TEST");
                if ($OSTYPE == "LINUX") {
                    submitkey("cmd", "FMG_UNRAR");
                }
                if ($OSTYPE == "LINUX") {
                    submitkey("cmd", "FMG_RAR");
                }
                submitkey("cmd", "FMG_REN");
                submitkey("cmd", "FMG_EDIT");
                submitkey("cmd", "FMG_NEW");
            }
            if ($prauth[$ADM][13]) {
                submitkey("cmd", "FMG_DELALL");
                submitkey("cmd", "FMG_DEL");
            }
            if ($prauth[$ADM][9]) {
                submitkey("cmd", "FMG_DOWNLOAD");
            }
            if ($prauth[$ADM][36]) {
                submitkey("cmd", "FMG_UPLOAD");
            }
            if ($prauth[$ADM][54]) {
                submitkey("cmd", "FMG_SHARE");
                //	 submitkey ("cmd","FMG_UNSHARE");
            }
            if (!$pr[75]) {
                submitkey("cmd", "FMG_REF");
                submitkey("cmd", "FMG_RESET");
            }
            if (!$hidefolder) {
                submitkey("cmd", "FMG_MASKAPPLY");
            }
            //scripting showkey mechanism
            if ($filscdata) {
                echo "<br>Configured scripts:<br>";
                for ($i = 1; $i < $filsccount; $i++) {
                    // echo "debug $i = $filscdata[$i][$keylanguage]   , key=[$keylanguage]<br>";
                    if ($filscdata[$i][$keylanguage] == "") {
                        continue;
                    }
                    submitkey("cmd", "." . $filscdata[$i][$keylanguage]);
                }
                //  fwrite ($a,"ID¦NAME¦Script¦Plevel¦keynames-icon¦russian¦english¦f1_russian¦f1_english¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦".$addOSenter);
                /*.*1¦mencoder %path%%file% -oac mp3lame -ovc x264 -o %path%%file%.avi¦0¦0¦перекодить в h264¦encode h264¦0¦0¦0¦0¦0
                2¦mencoder %path%%file% -oac mp3lame -ovc mpg -o %path%%file%.avi¦0¦0¦перекодить в mpeg¦encode mpeg¦0¦0¦0¦0¦0¦0
                */
            }
        }
        if ($noscreenmode == false) {
            if ($prauth[$ADM][7]) {
                submitimg("cmd" . $pid, "FMG_SRCH", "_ico/target.png");
                submitimg("cmd" . $pid, "FMG_ENTER", "_ico/openfolder.png");
                submitimg("cmd" . $pid, "FMG_EXIT", "_ico/folderup.png");
            }
            if ($prauth[$ADM][8]) {
                submitimg("cmd" . $pid, "FMG_DRV", "_ico/drv.png");
                submitimg("cmd" . $pid, "FMG_EXECUTE", "_ico/execute.png");
            }
            if ($prauth[$ADM][12]) {
                submitimg("cmd" . $pid, "FMG_MKDIR", "_ico/newfolder.png");
                submitimg("cmd" . $pid, "FMG_REN", "_ico/rename.png");
                submitimg("cmd" . $pid, "FMG_EDIT", "_ico/editfmg.png");
                submitimg("cmd" . $pid, "FMG_NEW", "_ico/newfile.png");
                submitimg("cmd" . $pid, "FMG_JOINFIL", "_ico/joinfiles.png");
                submitimg("cmd" . $pid, "FMG_UNZIP", "_ico/backup.png");
                submitimg("cmd" . $pid, "FMG_TEST", "_ico/apply_f2.png");
                if ($OSTYPE === "LINUX") {
                    submitimg("cmd" . $pid, "FMG_UNRAR", "_ico/backup.png");
                }
                if ($OSTYPE === "LINUX") {
                    submitimg("cmd" . $pid, "FMG_RAR", "_ico/backup.png");
                }
            }
            if ($prauth[$ADM][13]) {
                if ($prauth[$ADM][5] == true) {
                    submitimg("cmd" . $pid, "FMG_DELALL", "_ico/removefolder.png");
                }
                submitimg("cmd" . $pid, "FMG_DEL", "_ico/removefile.png");
            }
            if ($prauth[$ADM][9]) {
                submitimg("cmd" . $pid, "FMG_DOWNLOAD", "_ico/download.png");
            }
            if ($prauth[$ADM][36]) {
                if (!$pr[75]) {
                    submitimg("cmd" . $pid, "FMG_UPLOAD", "_ico/upload.png");
                }
                if ($pr[75]) {
                    submitimg("cmd" . $pid, "FMG_UPLOAD", "_ico/uploadalt.png");
                }
            }
            if ($prauth[$ADM][54]) {
                submitimg("cmd" . $pid, "FMG_SHARE", "_ico/w_accept.png");
                //submitimg ("cmd".$pid,"FMG_UNSHARE","_ico/w_close.png");
            }
            if (!$pr[75]) {
                submitimg("cmd" . $pid, "FMG_REF", "_ico/refresh.png");
                submitimg("cmd" . $pid, "FMG_RESET", "_ico/reset.png");
            }
            if (!$hidefolder) {
                submitimg("cmd" . $pid, "FMG_MASKAPPLY", "_ico/stargreen.png");
            }
        }
        if ($pid == 1 and $prauth[$ADM][12]) {
            // только 1 раз исполняется этот блок .  на 1 пиде.
            echo "<br>";
            echo cmsg("FMG2");
            submitimg("cmd" . $pid, "FMG_CPY_F", "_ico/copyfile.png");
            echo " ";
            submitimg("cmd" . $pid, "FMG_MOV_F", "_ico/movefile.png");
            echo " ";
            //submitimg ("cmd".$pid,"FMG_CPY_FLD","_ico/copyfolder.png");echo " ";
            submitimg("cmd" . $pid, "FMG_MOV_FLD", "_ico/movefolder.png");
            echo " ";
        }
        ?>
 <input type = hidden name = path<?php 
        echo $pid;
        ?>
 value ="<?php 
        echo $path;
        ?>
" >
<?php 
        if ($hidefolder) {
            unset($file);
        }
        //no filelist
        if ($file) {
            echo "<BR>" . cmsg("FMG_FILDB") . ":<select name =fileforaction" . $pid . "[] multiple size = " . $prauth[$ADM][49] . ">";
            sort($file);
            //нет реакции... print_r ($file); echo "Rewefkowe";
            for ($a = 0; $a < $dircnt; $a++) {
                if ($file[$a][0] === ".") {
                    continue;
                }
                if ($file[$a][0] === "..") {
                    continue;
                }
                if ($file[$a][0] === false) {
                    continue;
                }
                if ($file[$a][1]) {
                    $dir = "==>";
                } else {
                    $dir = "";
                }
                $fsizer = "";
                if ($dir !== "==>") {
                    $fsize = $file[$a][2];
                    // settype ($fsizer,"string");
                    if ($fsize < 1024) {
                        $fsizer = "[" . round($fsize, 1) . "b]";
                    }
                    if ($fsize < 1) {
                        $fsizer = "";
                    }
                    if ($fsize > 1024) {
                        $fsizer = "[" . round($fsize / 1024, 1) . "Kb]";
                    }
                    if ($fsize > 1024 * 1024) {
                        $fsizer = "[" . round($fsize / 1024 / 1024, 2) . "Mb]";
                    }
                    if ($fsize > 1024 * 1024 * 1024) {
                        $fsizer = "[" . round($fsize / 1024 / 1024 / 1024, 2) . "Gb]";
                    }
                }
                //$filesizemb=$file[$a][2]/1024;
                echo "<option value=\"" . $file[$a][0] . "\">" . $dir . $file[$a][0] . "" . $fsizer . "</option>";
            }
            // size (".$file[$a][2].")
            if ($pr[11] == 1) {
                //protected cmds
            }
            echo "</select></form>";
        }
        echo "<br>";
        $dbsdiskfree = round((int) (@disk_free_space($path) / (1024 * 1024 * 1024)), 1);
        $dbsdisktotal = (int) (@disk_total_space($path) / (1024 * 1024 * 1024));
        if ($pid == 1) {
            if ($ADM) {
                echo "Selected : Free " . $dbsdiskfree . "Gb ";
            }
            // сделать переключатель дисков или что то вроде указателя
            if ($ADM) {
                echo "\\" . $dbsdisktotal . "Gb<br>";
            }
            $disks = explode(",", $pr[79]);
            for ($a = 0; $a < count($disks); $a++) {
                $diskfree[$a] = round(@disk_free_space($disks[$a]) / (1024 * 1024 * 1024), 1);
                //Gb
                $disktotal[$a] = round(@disk_total_space($disks[$a]) / (1024 * 1024 * 1024), 1);
                //Gb
                if (!$pr[80]) {
                    echo "Disk " . $a . ":: " . $diskfree[$a] . "Gb \\ " . $disktotal[$a] . "Gb.<br>";
                }
                $avgfree = $avgfree + $diskfree[$a];
                $avgtotal = $avgtotal + $disktotal[$a];
            }
            $avgfree = $avgfree;
            $avgtotal = $avgtotal;
            echo " Summary :Free " . $avgfree . "Gb ";
            echo "\\" . $avgtotal . "Gb";
            echo "<br>";
        }
        //only pid 1 shows
    }
    // start menu show
}
예제 #25
0
파일: w.php 프로젝트: serj-43/db-script
 if ($prdbdata[$tbl][12] != "fdb") {
     radio("massoper", 2, "M_OP_2");
 }
 echo "<bR>";
 if (!$prauth[$ADM][5]) {
     echo "<gray>" . cmsg("M_OP_3") . cmsg("BLOCK") . "</gray>";
 }
 if ($prauth[$ADM][5]) {
     radio("massoper", 3, "M_OP_3");
 }
 echo "<bR>";
 radio("massoper", 4, "TO_BEST");
 checkbox($rewr, "rewr");
 lprint(REW_IF_PRES);
 echo "<br>";
 radio("massoper", 5, "NOP");
 echo "<bR>";
 while (list($var, $value) = each($_POST)) {
     if (substr($var, 0, 3) == "bxt") {
         $box[] = explode("¦", substr($var, 3));
         $boxcnt++;
         //echo "$var , ".substr($var,0,2) ."<br>";  generic table	//..echo "<BR>$var => $value <br>";
     }
 }
 for ($a = 0; $a < $boxcnt; $a++) {
     //echo " box[$a]==>".$box[$a][0].";".$box[$a][1]."<br>";  //ids vID  vID2  DISABLE VISIBLE
     hidekey("box" . $a, $box[$a][0] . "+" . $box[$a][1]);
 }
 //echo "ending cycle<br>";
 echo "Total given: {$a}  <br>";
 hidekey("masstbl", $tbl);
예제 #26
0
$this->view('header');
?>
<div class="container">
	<h1>订单选项</h1>
	<form method="post" class="form form-horizontal buy-form">
		<div class="steps">
			
			<li class="step">
				<div class="title">
					<label>1</label>
					消费形式
				</div>
				<div class="control-group">
					<div class="controls">
						<?php 
echo radio(array('否' => '现货', '是' => '礼品卡'), '是否卡片', $this->input->get('是否卡片') ? '是' : '否', true);
?>
					</div>
				</div>
			</li>

			<li class="step">
				<div class="title">
					<label>2</label>
					选择套餐
				</div>
				<div class="packages">
				<?php 
foreach ($packages['data'] as $package) {
    ?>
					<label class="radio">
예제 #27
0
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("Search criteria")));
insert($con, textbr(my_("Subnet network address (leave blank if range selected)")));
insert($con, span(my_("Partial subnet addresses can be used eg. 172.20"), array("class" => "textSmall")));
insert($con, input_text(array("name" => "ipaddr", "size" => "15", "maxlength" => "15")));
if (DBF_TYPE == "mysql" or DBF_TYPE == "maxsql" or DBF_TYPE == "postgres7") {
    insert($con, textbrbr(my_("Description (only display networks matching the regular expression)")));
} else {
    insert($con, textbrbr(my_("Description (only display networks containing)")));
}
insert($con, input_text(array("name" => "descrip", "size" => "80", "maxlength" => "80")));
// get filenames with xsl extension from templates directory
$files = array();
if ($dir = @opendir("../templates")) {
    while ($filename = readdir($dir)) {
        if (preg_match("/\\.xsl\$/", $filename)) {
            $files["{$filename}"] = $filename;
        }
    }
    closedir($dir);
}
insert($con, textbrbr(my_("Template")));
insert($con, selectbox($files, array("name" => "filename")));
insert($con, textbrbr(my_("Network name (ntname field on registrar template)")));
insert($con, radio(array("name" => "ntnameopt", "value" => "0"), my_("Generate automatically"), "checked"));
insert($con, radio(array("name" => "ntnameopt", "value" => "1"), my_("Use subnet description")));
insert($con, generic("br"));
insert($f2, submit(array("value" => my_("Submit"))));
insert($f2, freset(array("value" => my_("Clear"))));
myCopyPaste($f2, "ipplanCPswipform", "ENTRY");
printhtml($p);
예제 #28
0
insert($w, $f1 = form(array("name" => "THISFORM", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
// ugly kludge with global variable!
$displayall = TRUE;
$cust = myCustomerDropDown($ds, $f1, $cust, $grps) or myError($w, $p, my_("No customers"));
$areaindex = myAreaDropDown($ds, $f1, $cust, $areaindex);
insert($w, $f2 = form(array("name" => "ENTRY", "method" => "get", "action" => "findfree.php")));
// save customer name for actual post of data
insert($f2, hidden(array("name" => "cust", "value" => "{$cust}")));
myRangeDropDown($ds, $f2, $cust, $areaindex);
insert($f2, block("<p>"));
insert($f2, $con = container("fieldset", array("class" => "fieldset")));
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("Search criteria")));
insert($con, textbr(my_("IP range start (leave blank if range selected)")));
insert($con, input_text(array("name" => "start", "size" => "15", "maxlength" => "15")));
insert($con, textbrbr(my_("IP range end (leave blank if range selected)")));
insert($con, input_text(array("name" => "end", "size" => "15", "maxlength" => "15")));
insert($con, textbrbr(my_("Display only subnets between these sizes")));
insert($con, span(my_("Minimum"), array("class" => "textSmall")));
insert($con, input_text(array("name" => "size_from", "size" => "5", "maxlength" => "6")));
insert($con, span(my_("Maximum"), array("class" => "textSmall")));
insert($con, input_text(array("name" => "size_to", "size" => "5", "maxlength" => "6")));
insert($con, textbrbr(my_("Show filter")));
insert($con, radio(array("name" => "showused", "value" => "0"), my_("Free and Unassigned")));
insert($con, radio(array("name" => "showused", "value" => "2"), my_("Unassigned only")));
insert($con, radio(array("name" => "showused", "value" => "1"), my_("All"), "checked"));
insert($con, generic("br"));
insert($f2, submit(array("value" => my_("Submit"))));
insert($f2, freset(array("value" => my_("Clear"))));
myCopyPaste($f2, "ipplanCPfindfreeform", "ENTRY");
printhtml($p);
예제 #29
0
function status_radio($Status)
{
    global $statuses;
    $Status = !$Status ? 4 : $Status;
    foreach ($statuses as $a => $b) {
        $out[] = n . t . '<li>' . radio('Status', $a, $Status == $a ? 1 : 0, 'status-' . $a) . '<label for="status-' . $a . '">' . $b . '</label></li>';
    }
    return '<ul class="plain-list">' . join('', $out) . n . '</ul>';
}
예제 #30
0
function check_all_fields($title, $variable, $select_form_field, $required = NULL, $class = NULL, $multistep = NULL)
{
    $output = '';
    if ($select_form_field == 'text') {
        $required = required($required);
        $output .= '<label for="' . $variable . '">' . $title . '</label>' . "\n <br />";
        $output .= '<input type="text" class="' . $required . '" name="' . $variable . '" id="' . $variable . '" />' . "\n";
    } elseif ($select_form_field == 'textarea') {
        $required = required($required);
        $output .= '<label for="' . $variable . '">' . $title . '</label>' . "\n <br>";
        $output .= '<textarea class="' . $class . ' ' . $required . '" name="' . $variable . '"  id="' . $variable . '" /></textarea>' . "\n";
    } elseif ($select_form_field == 'select') {
        $required = required($required);
        $output .= '<label for="' . $variable . '">' . $title . '</label>' . "\n <br>";
        $output .= '<select name="' . $variable . '"  class="' . $class . ' ' . $required . '"  id="' . $variable . '" >' . "\n";
        $output .= multiplefield($multistep);
        $output .= '</select>' . "\n";
    } elseif ($select_form_field == 'check') {
        $output .= '<label for="' . $variable . '">' . $title . '</label>' . "\n <br>";
        $check = required($required, $title, 'check');
        $output .= checkbox($multistep, $title, $variable, $check);
    } elseif ($select_form_field == 'radio') {
        $output .= '<label for="' . $variable . '">' . $title . '</label>' . "\n <br>";
        $red = required($required, $title, 'check');
        $output .= radio($multistep, $title, $variable, $red);
    }
    $output .= '<br />';
    return $output;
}