Changeset 24393 for extensions/meta/admin
- Timestamp:
- Sep 10, 2013, 8:27:33 PM (11 years ago)
- Location:
- extensions/meta/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/meta/admin/admin.php
r22769 r24393 26 26 l10n('Personal Metadata'), 27 27 $my_base_url.'&tab=persometa'); 28 29 $MPC = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ContactForm';")); 30 if($MPC['state'] == 'active') 31 { 32 $tabsheet->add('contactmeta', 33 l10n('Contact page Metadata'), 34 $my_base_url.'&tab=contactmeta'); 35 } 36 $MAP = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'AdditionalPages';")); 37 if($MAP['state'] == 'active') 38 { 39 $tabsheet->add('AdditionalPagesmeta', 40 l10n('Additional Pages Metadata'), 41 $my_base_url.'&tab=AdditionalPagesmeta'); 42 } 43 28 44 $tabsheet->add('description', 29 45 l10n('meta_onglet_description'), … … 209 225 break; 210 226 227 case 'contactmeta': 228 229 $metacontact = explode(',', $conf['contactmeta']); 230 231 $template->assign('contactmetaT', 232 array('CMKEY' => $metacontact[0],'CMDESC' => $metacontact[1],)); 233 234 if (isset($_POST['submitcm'])) 235 { 236 $INSCM = $_POST['inser'].",".$_POST['inser2']; 237 conf_update_param('contactmeta', $INSCM); 238 $template->assign( 239 'contactmetaT', 240 array('CMKEY' => stripslashes($_POST['inser']),'CMDESC' => stripslashes($_POST['inser2']))); 241 } 242 243 break; 244 245 case 'AdditionalPagesmeta': 246 if (!defined('TITLE_AP_TABLE')) define('TITLE_AP_TABLE', $prefixeTable.'title_ap'); 247 $groups = array(); 248 $query = ' 249 select id,title 250 FROM ' . ADD_PAGES_TABLE . ' 251 ORDER BY id ASC;'; 252 $result = pwg_query($query); 253 254 while ($row = pwg_db_fetch_assoc($result)) 255 { 256 $groups[$row['id']] = $row['id'].' : '.$row['title']; 257 } 258 259 $selected = 0; 260 $options[] = l10n('Choose it page'); 261 $options['a'] = '----------------------'; 262 263 foreach($groups as $listid => $listid2) 264 { 265 $options[$listid] = $listid2; 266 } 267 $template->assign( 268 'gestionC', 269 array( 270 'OPTIONS' => $options, 271 'SELECTED' => $selected 272 )); 273 274 if (isset($_POST['submitchoixAP'])and is_numeric($_POST['APchoix']) and (!$_POST['APchoix'])==0) 275 { 276 $lire=$_POST['APchoix']; 277 $query = ' 278 select id,metaKeyap,metadesap 279 FROM ' . META_AP_TABLE . ' 280 WHERE id = \''.$lire.'\' 281 ;'; 282 $result = pwg_query($query); 283 $row = pwg_db_fetch_assoc($result); 284 $metaKeyapap=$row['metaKeyap']; 285 $metadesap=$row['metadesap']; 286 287 $query = ' 288 select id,title 289 FROM ' . ADD_PAGES_TABLE . ' 290 WHERE id = \''.$lire.'\' 291 ;'; 292 $result = pwg_query($query); 293 $row = pwg_db_fetch_assoc($result); 294 $idap=$row['id']; 295 $nameap=$row['title']; 296 297 $selected3 = 0; 298 299 $template->assign( 300 'ap_edit', 301 array( 302 'VALUE' => $idap, 303 'VALUEN' => $nameap, 304 'CONTENTMKAP' => $metaKeyapap, 305 'CONTENTMDAP' => $metadesap, 306 'SELECTED' => $selected3 307 )); 308 } 309 310 if (isset($_POST['submitinsapm'])) 311 { 312 $query = ' 313 DELETE 314 FROM ' . META_AP_TABLE . ' 315 WHERE id = \''.$_POST['invisible'].'\' 316 ;'; 317 $result = pwg_query($query); 318 $q = ' 319 INSERT INTO ' . $prefixeTable . 'meta_ap(id,metaKeyap,metadesap)VALUES ('.$_POST['invisible'].',"'.$_POST['inser'].'","'.$_POST['inser2'].'");'; 320 pwg_query($q); 321 } 322 323 break; 211 324 212 325 } -
extensions/meta/admin/admin.tpl
r22769 r24393 90 90 {/if} 91 91 {/if} 92 93 {if isset ($contactmetaT)} 94 <form method="post" > 95 <fieldset id="mainConf"> 96 {'Keywords of contact page to be completed'|@translate} :<br> 97 <input type="text" name="inser" value="{$contactmetaT.CMKEY}" size="110" maxlenght="110"> 98 <br> 99 <br> 100 {'Description of contact page to be completed'|@translate} :<br> 101 <input type="text" name="inser2" value="{$contactmetaT.CMDESC}" size="110" maxlenght="110"> 102 <br> 103 <br> 104 <p> 105 <input class="submit" type="submit" name="submitcm" value="{'Submit'|@translate}"> 106 <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}"> 107 </p> 108 </form> 109 {/if} 110 111 {if isset ($gestionC)} 112 <div> 113 <form method="post" > 114 <fieldset> 115 <legend>{'Choose Additional Pages'|@translate}</legend> 116 {html_options name="APchoix" options=$gestionC.OPTIONS selected=$gestionC.SELECTED} 117 <br> 118 <br> 119 <div style="text-align:center;"> 120 <input class="submit" name="submitchoixAP" type="submit" value="{'Submit'|@translate}" /> 121 </div> 122 </fieldset> 123 </form> 124 </div> 125 {if isset ($ap_edit)} 126 <div> 127 <form method="post" > 128 <fieldset> 129 <legend>{'Add metadata for page'|@translate} {$ap_edit.VALUEN} (id : {$ap_edit.VALUE})</legend> 130 <input type="hidden" name="invisible" value="{$ap_edit.VALUE}"> 131 <br> 132 {'Keywords of Additional Pages to be completed'|@translate}<br> 133 <input type="text" name="inser" value="{$ap_edit.CONTENTMKAP}" size="110" maxlenght="110"> 134 <br> 135 <br> 136 {'Description of Additional Pages to be completed'|@translate}<br> 137 <input type="text" name="inser2" value="{$ap_edit.CONTENTMDAP}" size="110" maxlenght="110"> 138 <br> 139 <br> 140 <div style="text-align:center;"> 141 <input class="submit" name="submitinsapm" type="submit" value="{'Submit'|@translate}"/> 142 </div> 143 </fieldset> 144 </form> 145 </div> 146 {/if} 147 {/if}
Note: See TracChangeset
for help on using the changeset viewer.