protected function gen_select()
 {
     global $charset;
     //si on est en création de cadre
     if (!$this->id) {
         $this->parameters['type_editorial'] = array();
     }
     $select = "\n\t\t<select name='" . $this->get_form_value_name("section") . "[]' multiple='yes'>";
     $types = new cms_editorial_types("section");
     $types->get_types();
     for ($i = 0; $i < count($types->types); $i++) {
         $select .= "\r\n\t\t\t<option value='" . $types->types[$i]['id'] . "'" . (in_array($types->types[$i]['id'], $this->parameters['type_editorial']) ? " selected='selected'" : "") . ">" . htmlentities($types->types[$i]['label'], ENT_QUOTES, $charset) . "</option>";
     }
     $select .= "\n\t\t</select>";
     return $select;
 }
コード例 #2
0
     if ($cms_active && SESSrights & CMS_AUTH) {
         $publications_states = new cms_editorial_publications_states();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $publications_states->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } elseif ($field == "deflt_cms_article_type") {
     if ($cms_active && SESSrights & CMS_AUTH) {
         $types = new cms_editorial_types('article');
         $types->get_types();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $types->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } elseif ($field == "deflt_cms_section_type") {
     if ($cms_active && SESSrights & CMS_AUTH) {
         $types = new cms_editorial_types('section');
         $types->get_types();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $types->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } elseif ($field == "deflt_scan_request_status") {
     if ($pmb_scan_request_activate) {
         $request_status_instance = new scan_request_status();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $request_status_instance->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } else {
     $deflt_table = substr($field, 6);
     if ($deflt_table == "integration_notice_statut") {
         $deflt_table = "notice_statut";
     }
     switch ($field) {
コード例 #3
0
ファイル: cms_editorial.class.php プロジェクト: hogsim/PMB
 protected function get_type_field()
 {
     global $cms_editorial_type_field;
     $types = new cms_editorial_types($this->type);
     $types->get_types();
     if (count($types->types)) {
         $cms_editorial_type_field = str_replace("!!type!!", $this->type, $cms_editorial_type_field);
         return str_replace("!!cms_editorial_form_type_options!!", $types->get_selector_options($this->num_type), $cms_editorial_type_field);
     } else {
         return "";
     }
 }