当前位置: 首页>>代码示例>>PHP>>正文


PHP radio函数代码示例

本文整理汇总了PHP中radio函数的典型用法代码示例。如果您正苦于以下问题:PHP radio函数的具体用法?PHP radio怎么用?PHP radio使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了radio函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explodeCatz

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));
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:60,代码来源:exec.squid.explodecatz.php

示例2: getHtmlTag

 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;
 }
开发者ID:Aeness,项目名称:Flunker,代码行数:9,代码来源:class_filter.php

示例3: afficherFormulaire

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)));
}
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:10,代码来源:ajout_formulaire_contact_client.php

示例4: afficherFormulaire

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)));
}
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:10,代码来源:ajout_formulaire_fournisseur.php

示例5: afficherFormulaire

/**
 * 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)));
}
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:15,代码来源:ajout_formulaire_collaborateur_externe.php

示例6: wet_article_partial_category_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>';
}
开发者ID:rwetzlmayr,项目名称:wet_sample_partials_meta,代码行数:20,代码来源:wet_sample_partials_meta.php

示例7: afficherFormulaire

/**
 * 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;
}
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:22,代码来源:ajout_formulaire_collaborateur_interne.php

示例8: filterItemForm

 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;
 }
开发者ID:kent-state-university-libraries,项目名称:ControlledVocab,代码行数:21,代码来源:plugin.php

示例9: afficherFormulaire

/**
 * 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;
}
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:44,代码来源:ajout_formulaire_projet.php

示例10: IN

         $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;
                 }
开发者ID:AurelienAubert,项目名称:Stage_Apsaroke,代码行数:31,代码来源:tab_conges.php

示例11: radio_list

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>';
}
开发者ID:nope,项目名称:textpattern,代码行数:9,代码来源:txplib_forms.php

示例12: status_radio

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);
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:9,代码来源:txp_article.php

示例13: radio

             <?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 
开发者ID:shaamimahmed,项目名称:tsugi,代码行数:31,代码来源:profile.php

示例14: status_radio

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);
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:9,代码来源:txp_article.php

示例15: display_languages

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();
}
开发者ID:pthdnq,项目名称:ivalley-svn,代码行数:79,代码来源:inst_lang.php


注:本文中的radio函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。