[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Summary view] [Print] [Text view]
1 <?php 2 // ---------------------------------------------------------------- 3 // obligate check for phpwcms constants 4 if (!defined('PHPWCMS_ROOT')) { 5 die("You Cannot Access This Script Directly, Have a Nice Day."); 6 } 7 // ---------------------------------------------------------------- 8 9 ?> 10 <h1 class="title" style="margin-bottom:10px;padding-left:21px;background:url(img/famfamfam/rss.png) no-repeat left center;"><?php echo $BLM['listing_title'] ?></h1> 11 12 <form action="<?php echo MODULE_HREF ?>&edit=<?php echo $plugin['data']['id'] ?>" method="post" id="address_form" style="background:#F3F5F8;border-top:1px solid #92A1AF;border-bottom:1px solid #92A1AF;margin:0 0 5px 0;padding:10px 8px 15px 8px"> 13 <input type="hidden" name="id" value="<?php echo $plugin['data']['id'] ?>" /> 14 <table border="0" cellpadding="0" cellspacing="0" width="100%" summary=""> 15 <?php 16 17 $BE['HEADER']['form_css'] = ' <style type="text/css"> 18 ul.radiobutton {list-style:none;margin:0;padding:0;} 19 ul.radiobutton li {list-style:none;margin:0;padding:0;} 20 </style>'; 21 22 $plugin['hidden_fields'] = ''; 23 24 foreach($plugin['fields'] as $key => $value) { 25 26 switch($value) { 27 28 case 'FILE': 29 30 if(empty($plugin['filebrowser_js'])) { 31 32 $BE['HEADER']['fbjs'] = ' <script type="text/javascript">' . LF; 33 $BE['HEADER']['fbjs'] .= "function openFileBrowser(image_number){"; 34 $BE['HEADER']['fbjs'] .= "tmt_winOpen('filebrowser.php?opt=15&target=nolist&entry_id='+image_number,'imageBrowser',"; 35 $BE['HEADER']['fbjs'] .= "'width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes',1);return false;}".LF; 36 $BE['HEADER']['fbjs'] .= "function setIdName(image_number, file_id, file_name){"; 37 $BE['HEADER']['fbjs'] .= "if(file_id == null || file_name == null) return null;imageBrowser.close();"; 38 $BE['HEADER']['fbjs'] .= "$('fileid_'+image_number).value = file_id;$('file_'+image_number).value = file_name;}".LF; 39 $BE['HEADER']['fbjs'] .= "function deleteIdData(image_number, e) {"."$('file_'+image_number).value='';"; 40 $BE['HEADER']['fbjs'] .= "$('fileid_'+image_number).value='0';e.blur();return false;}".LF; 41 $BE['HEADER']['fbjs'] .= ' </script>'; 42 43 } 44 45 if(empty($plugin['file_'.$key]) && empty($plugin['data'][$key])) { 46 $plugin['file_'.$key] = ''; 47 } elseif(!empty($plugin['file_'.$key])) { 48 $plugin['file_'.$key] = html_specialchars($plugin['file_'.$key]); 49 } elseif($plugin['data'][$key]) { 50 $plugin['file_'.$key] = getFileInformation($plugin['data'][$key]); 51 $plugin['file_'.$key] = empty($plugin['file_'.$key][0]['f_name']) ? '' : html_specialchars($plugin['file_'.$key][0]['f_name']); 52 } else { 53 $plugin['file_'.$key] = ''; 54 } 55 56 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 57 echo '<tr>'.LF; 58 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF.'<td><table border="0" cellpadding="0" cellspacing="0" summary=""><tr><td>'; 59 echo '<input name="file_'.$key.'" type="text" id="file_'.$key.'" class="v12 width300 greyed" value="'.$plugin['file_'.$key].'" onfocus="this.blur();" />'; 60 echo '<input type="hidden" name="'.$key.'" id="fileid_'.$key.'" value="'.html_specialchars($plugin['data'][$key]).'" /></td>'; 61 echo '<td> <a href="#" title="'.$BL['be_cnt_openfilebrowser'].'" onclick="return openFileBrowser(\''.$key.'\');"><img src="img/button/open_image_button.gif" alt="" width="20" height="15" border="0" /></a></td>'; 62 echo '<td> <a href="#" title="'.$BL['be_cnt_delfile'].'" onclick="return deleteIdData(\''.$key.'\',this);"><img src="img/button/del_image_button.gif" alt="" width="15" height="15" border="0" /></a></td>'; 63 64 echo '</tr></table></td>'.LF.'</tr>'.LF; 65 break; 66 67 68 case 'HIDDEN': 69 $plugin['hidden_fields'] .= '<input type="hidden" name="'.$key.'" id="'.$key.'" value="'.html_specialchars($plugin['data'][$key]).'" />'; 70 break; 71 72 73 case 'HIDDENINT': 74 $plugin['hidden_fields'] .= '<input type="hidden" name="'.$key.'" id="'.$key.'" value="'.(empty($plugin['data'][$key]) ? 0 : intval($plugin['data'][$key])).'" />'; 75 break; 76 77 78 case 'STRING': 79 80 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 81 echo '<tr>'.LF; 82 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF; 83 echo '<td><input name="'.$key.'" type="text" id="'.$key.'" class="v12 width400" value="'.html_specialchars($plugin['data'][$key]).'" size="30" maxlength="200" /></td>'.LF; 84 echo '</tr>'.LF; 85 break; 86 87 case 'STRING-DISABLED': 88 89 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 90 echo '<tr>'.LF; 91 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF; 92 echo '<td><input name="'.$key.'" type="text" id="'.$key.'" class="v12 width400" value="'.html_specialchars($plugin['data'][$key]).'" size="30" maxlength="200" disabled="disabled" /></td>'.LF; 93 echo '</tr>'.LF; 94 break; 95 96 97 case 'TEXTAREA': 98 99 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 100 echo '<tr>'.LF; 101 echo '<td align="right" class="chatlist tdtop4">'.$BLM[$key].': </td>'.LF; 102 echo '<td><textarea name="'.$key.'" id="'.$key.'" class="v12 width400" rows="4">'.html_specialchars($plugin['data'][$key]).'</textarea></td>'.LF; 103 echo '</tr>'.LF; 104 break; 105 106 107 case 'INT': 108 case 'FLOAT': 109 110 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 111 echo '<tr>'.LF; 112 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF; 113 echo '<td><input name="'.$key.'" type="text" id="'.$key.'" class="v12 width150" value="'.html_specialchars($plugin['data'][$key]).'" size="30" maxlength="200" /></td>'.LF; 114 echo '</tr>'.LF; 115 break; 116 117 118 case 'CHECK': 119 120 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 121 echo '<tr>'.LF; 122 echo '<td> </td>'.LF; 123 echo '<td><table border="0" cellpadding="0" cellspacing="0" summary=""><tr><td><input type="checkbox" name="'.$key.'" id="'.$key.'" value="1"'; 124 is_checked($plugin['data'][$key], 1); 125 echo ' /></td><td><label for="'.$key.'">'.$BLM[$key].'</label></td></tr></table></td>'.LF; 126 echo '</tr>'.LF; 127 break; 128 129 130 case 'SELECT': 131 case 'MULTISELECT': 132 133 $plugin['select'] = array(); 134 135 if(isset( $plugin['fields_' . $key ] )) { 136 137 if(is_array($plugin['fields_' . $key ])) { 138 139 $plugin['select'] = $plugin['fields_' . $key ]; 140 141 // check if the string is a valid function to retrieve field options/values 142 } elseif(is_string($plugin['fields_' . $key ])) { 143 144 if(function_exists($plugin['fields_' . $key ])) { 145 146 $plugin_function = $plugin['fields_' . $key ]; 147 148 $plugin['select'] = $plugin_function(); 149 150 } 151 // maybe elseif here could be used to check string against imploded 152 // array members separated by "," or any other delimeter 153 154 } 155 156 } 157 158 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 159 echo '<tr>'.LF; 160 echo '<td align="right" class="chatlist tdtop4">'.$BLM[$key].': </td>'.LF; 161 echo '<td><select id="'.$key.'" class="v12" style="min-width:75px;max-width:400px;" name="'.$key; 162 echo $value == 'MULTISELECT' ? '[]" multiple="multiple" size="6"' : '"'; 163 echo '>' . LF; 164 165 $_options_pre = array(); 166 $_options_end = array(); 167 $_option_remember = array(); 168 169 foreach($plugin['select'] as $item => $row) { 170 171 $_selected = false; 172 $_option = ' <option value="' . html_specialchars($item) .'"'; 173 if($value == 'MULTISELECT') { 174 if( in_array($item, $plugin['data'][$key]) ) { 175 $_option .= ' selected="selected"'; 176 $_option_remember[] = $row; 177 $_selected = true; 178 } 179 } else { 180 if( $plugin['data'][$key] == $item ) { 181 $_option .= ' selected="selected"'; 182 $_selected = true; 183 } 184 } 185 $_option .= '>' . html_specialchars(trim($row)) . '</option>'; 186 187 if($value == 'MULTISELECT' && $_selected) { 188 $_options_pre[] = $_option; 189 } else { 190 $_options_end[] = $_option; 191 } 192 193 } 194 195 echo implode(LF, $_options_pre) . LF . implode(LF, $_options_end) . LF; 196 197 echo '</select></td>'.LF.'</tr>'.LF; 198 199 if(count($_option_remember)) { 200 echo '<tr>'.LF; 201 echo '<td align="right"> </td>'.LF; 202 echo '<td class="tdtop3"><em>'.html_specialchars(implode(', ', $_option_remember)).'</em></td>'.LF.'</tr>'.LF; 203 } 204 205 break; 206 207 208 case 'MULTICHECK': 209 210 $plugin['multicheck'] = array(); 211 212 if(isset( $plugin['fields_' . $key ] )) { 213 214 if(is_array($plugin['fields_' . $key ])) { 215 216 $plugin['multicheck'] = $plugin['fields_' . $key ]; 217 218 // check if the string is a valid function to retrieve field options/values 219 } elseif(is_string($plugin['fields_' . $key ])) { 220 221 if(function_exists($plugin['fields_' . $key ])) { 222 223 $plugin_function = $plugin['fields_' . $key ]; 224 225 $plugin['multicheck'] = $plugin_function(); 226 227 } 228 // maybe elseif here could be used to check string against imploded 229 // array members separated by "," or any other delimeter 230 231 } 232 233 } 234 235 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 236 echo '<tr>'.LF; 237 echo '<td align="right" class="chatlist tdtop4">'.$BLM[$key].': </td>'.LF; 238 echo '<td><ul class="multicheck">' . LF; 239 240 $_options_pre = array(); 241 $_options_end = array(); 242 243 foreach($plugin['multicheck'] as $item => $row) { 244 245 $_selected = false; 246 $_option = ' <li><label><input type="checkbox" name="'.$key.'[]" value="' . html_specialchars($item) .'"'; 247 if( in_array($item, $plugin['data'][$key]) ) { 248 $_option .= ' checked="checked"'; 249 $_selected = true; 250 } 251 $_option .= ' />' . html_specialchars(trim($row)) . '</label></li>'; 252 253 if($_selected) { 254 $_options_pre[] = $_option; 255 } else { 256 $_options_end[] = $_option; 257 } 258 259 } 260 261 echo implode(LF, $_options_pre) . LF . implode(LF, $_options_end) . LF; 262 263 echo '</ul></td>'.LF.'</tr>'.LF; 264 265 break; 266 267 case 'RADIO': 268 269 $plugin['radiobutton'] = array(); 270 271 if(isset( $plugin['fields_' . $key ] )) { 272 273 if(is_array($plugin['fields_' . $key ])) { 274 275 $plugin['radiobutton'] = $plugin['fields_' . $key ]; 276 277 // check if the string is a valid function to retrieve field options/values 278 } elseif(is_string($plugin['fields_' . $key ])) { 279 280 if(function_exists($plugin['fields_' . $key ])) { 281 282 $plugin_function = $plugin['fields_' . $key ]; 283 284 $plugin['radiobutton'] = $plugin_function(); 285 286 } 287 288 } 289 290 } 291 292 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 293 echo '<tr>'.LF; 294 echo '<td align="right" class="chatlist tdtop4">'.$BLM[$key].': </td>'.LF; 295 echo '<td><ul class="radiobutton">' . LF; 296 297 $_options_pre = array(); 298 299 foreach($plugin['radiobutton'] as $item => $row) { 300 301 $_selected = false; 302 $_option = ' <li><label><input type="radio" name="'.$key.'" value="' . html_specialchars($item) .'"'; 303 if( strval($item) == strval($plugin['data'][$key]) ) { 304 $_option .= ' checked="checked"'; 305 $_selected = true; 306 } 307 $_option .= ' />' . html_specialchars(trim($row)) . '</label></li>'; 308 309 $_options_pre[] = $_option; 310 311 } 312 313 echo implode(LF, $_options_pre) . LF; 314 315 echo '</ul></td>'.LF.'</tr>'.LF; 316 317 break; 318 319 320 case 'DATESELECT': 321 322 // needs MooTools 1.2 and load datepicker 323 if(empty($plugin['date_select_loaded'])) { 324 325 initMootools('1.2'); 326 327 $BE['HEADER']['datepicker.js'] = getJavaScriptSourceLink(TEMPLATE_PATH.'lib/datepicker/datepicker.js'); 328 $BE['HEADER']['datepicker.css'] = ' <link href="'.TEMPLATE_PATH.'lib/datepicker/datepicker.css" rel="stylesheet" type="text/css" />'; 329 $BE['HEADER']['datepicker_vista.css'] = ' <link href="'.TEMPLATE_PATH.'lib/datepicker/datepicker_vista/datepicker_vista.css" rel="stylesheet" type="text/css" />'; 330 $BE['HEADER']['datepicker'] = ' <script type="text/javascript">' . LF; 331 $BE['HEADER']['datepicker'] .= ' window.addEvent("domready", function(){'; 332 $BE['HEADER']['datepicker'] .= "new DatePicker($$('.dateselect'), {"; 333 $BE['HEADER']['datepicker'] .= "pickerClass:'datepicker_vista', "; 334 $BE['HEADER']['datepicker'] .= "positionOffset: {x: 110, y: -30}, "; 335 $BE['HEADER']['datepicker'] .= "format: 'd.m.Y', allowEmpty: true, "; 336 $BE['HEADER']['datepicker'] .= "inputOutputFormat: 'U', "; 337 $BE['HEADER']['datepicker'] .= "days: ".$BLM['days'].", "; 338 $BE['HEADER']['datepicker'] .= "months: ".$BLM['months'].", "; 339 $BE['HEADER']['datepicker'] .= '});});' . LF; 340 $BE['HEADER']['datepicker'] .= ' </script>'; 341 342 $plugin['date_select_loaded'] = true; 343 } 344 345 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 346 echo '<tr>'.LF; 347 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF; 348 echo '<td><input name="'.$key.'" type="text" id="'.$key.'" class="v12 dateselect" value="'.html_specialchars($plugin['data'][$key]).'" size="30" maxlength="10" /></td>'.LF; 349 echo '</tr>'.LF; 350 break; 351 352 case 'DECIMAL': 353 354 // needs MooTools 1.2 and MooTools More 355 if(empty($plugin['meio.mask_loaded'])) { 356 357 initMootools('1.2', array('Element/Element.Forms')); // need MooTools More and Element.Forms 358 $BE['HEADER']['Meio.Mask.min.js'] = getJavaScriptSourceLink(TEMPLATE_PATH.'lib/meio.mask/Meio.Mask.min.js'); 359 360 $BE['HEADER']['meio.mask'] = ' <script type="text/javascript">' . LF; 361 $BE['HEADER']['meio.mask'] .= ' window.addEvent("domready", function() { 362 var meiomasks_eur = $$("input.decimal-eur"); 363 var meiomasks_int = $$("input.decimal-int"); 364 var meiomasks_cent = $$("input.decimal-cent"); 365 if(meiomasks_eur.length > 0) { 366 meiomasks_eur.each(function(el){ 367 el.meiomask("' . $BLM['meio.mask'] .'", { 368 autoEmpty: true, 369 autoTab: true, 370 alignText: true, 371 decimal: "' . $BLM['price_dec_point'] . '", 372 thousands: "' . $BLM['price_thousands_sep'] . '", 373 precision: ' . $BLM['price_decimals'] . ', 374 symbol: "€ " 375 }); 376 }); 377 } 378 if(meiomasks_int.length > 0) { 379 meiomasks_int.each(function(el){ 380 el.meiomask("' . $BLM['meio.mask'] .'", { 381 autoEmpty: true, 382 autoTab: true, 383 alignText: true, 384 decimal: "' . $BLM['price_dec_point'] . '", 385 thousands: "' . $BLM['price_thousands_sep'] . '", 386 precision: ' . $BLM['price_decimalint'] . ', 387 symbol: "" 388 }); 389 }); 390 } 391 if(meiomasks_cent.length > 0) { 392 meiomasks_cent.each(function(el){ 393 el.meiomask("' . $BLM['meio.mask'] .'", { 394 autoEmpty: true, 395 autoTab: true, 396 alignText: true, 397 decimal: "' . $BLM['price_dec_point'] . '", 398 thousands: "' . $BLM['price_thousands_sep'] . '", 399 precision: ' . $BLM['price_decimals'] . ', 400 symbol: "Cent " 401 }); 402 }); 403 } 404 });' . LF; 405 $BE['HEADER']['meio.mask'] .= ' </script>'; 406 407 $plugin['meio.mask_loaded'] = true; 408 } 409 410 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'.LF; 411 echo '<tr>'.LF; 412 echo '<td align="right" class="chatlist">'.$BLM[$key].': </td>'.LF; 413 echo '<td><input name="'.$key.'" type="text" id="'.$key.'" class="v12 width100 '.$BLM[$key.'_class'].'" '; 414 echo 'value="'.html_specialchars(decformat($plugin['data'][$key])).'" size="30" maxlength="200" /> '.$BLM[$key.'_add'].'</td>'.LF; 415 echo '</tr>'.LF; 416 break; 417 418 419 } 420 421 } 422 ?> 423 424 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr> 425 426 <tr> 427 <td> </td> 428 <td> 429 <input name="submit" type="submit" class="button10" value="<?php echo empty($plugin['data']['id']) ? $BL['be_admin_fcat_button2'] : $BL['be_article_cnt_button1'] ?>" /> 430 <input name="save" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>" /> 431 432 <input name="new" type="button" class="button10" value="<?php echo ucfirst($BL['be_msg_new']) ?>" onclick="location.href='<?php echo MODULE_HREF ?>&edit=0';return false;" /> 433 <input name="close" type="button" class="button10" value="<?php echo $BL['be_admin_struct_close'] ?>" onclick="location.href='<?php echo MODULE_HREF ?>';return false;" /> 434 <input type="reset" class="button10" value="<?php echo $BL['be_cnt_field']['reset'] ?>" /> 435 </td> 436 </tr> 437 438 </table> 439 440 <?php echo $plugin['hidden_fields'] ?> 441 442 </form>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |