[ Index ] |
PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // ---------------------------------------------------------------- 24 // obligate check for phpwcms constants 25 if (!defined('PHPWCMS_ROOT')) { 26 die("You Cannot Access This Script Directly, Have a Nice Day."); 27 } 28 // ---------------------------------------------------------------- 29 30 31 // email contact form 32 33 $field_counter = 0; 34 initMootools(); 35 $BE['HEADER']['contentpart.js'] = getJavaScriptSourceLink('include/inc_js/contentpart.js'); 36 $BE['HEADER']['custom_js'] = '<script type="text/javascript"> 37 <!-- 38 function initMathSpam() { 39 $("cform_field_value_0").value = "+ = '. 40 $BL['be_cnt_field']['summing']. 41 '\n- = '. 42 $BL['be_cnt_field']['subtract']. 43 '\n* = '. 44 $BL['be_cnt_field']['multiply']. 45 '\n: = '. 46 $BL['be_cnt_field']['divide']. 47 '\ncalc = '. 48 $BL['be_cnt_field']['calculation']. 49 '"; 50 } 51 function setFieldValue(el) { 52 if(el.options[el.selectedIndex].value == "mathspam") { 53 initMathSpam(); 54 } 55 } 56 //--> 57 </script>'; 58 59 60 61 if(empty($content['form']) || !is_array($content['form'])) $content['form'] = array(); 62 63 $content['form'] = array_merge( array( 64 'subject' => '', 65 'startup' => '', 66 'startup_html' => 0, 67 'targettype' => 'email', 68 'class' => '', 69 'target' => '', 70 "copyto" => '', 71 "sendcopy" => 0, 72 "onsuccess_redirect" => 0, 73 "onsuccess" => '', 74 "onerror_redirect" => 0, 75 "onerror" => '', 76 "template_format" => 0, 77 "template" => '', 78 "template_format_copy" => 0, 79 "template_copy" => '', 80 'template_equal' => 1, 81 "customform" => '', 82 'sender' => '', 83 'sendertype' => 'email', 84 'sendername' => '', 85 'sendernametype' => 'custom', 86 'cc' => '', 87 'subjectselect' => '', 88 'savedb' => 0, 89 'saveprofile' => 0, 90 'verifyemail' => '', 91 'formtracking_off' => 0, 92 'checktofrom' => 0, 93 'function_to' => '', 94 'function_cc' => '' ), $content['form']); 95 96 $content['profile_fields'] = array( 97 "title" => $BL['be_profile_label_title'], 98 "firstname" => $BL['be_profile_label_firstname'], 99 "lastname" => $BL['be_profile_label_name'], 100 "company" => $BL['be_profile_label_company'], 101 "street" => $BL['be_profile_label_street'], 102 "add" => $BL['be_profile_label_add'], 103 "city" => $BL['be_profile_label_city'], 104 "zip" => $BL['be_profile_label_zip'], 105 "region" => $BL['be_profile_label_state'], 106 "country" => $BL['be_profile_label_country'], 107 "fon" => $BL['be_profile_label_phone'], 108 "fax" => $BL['be_profile_label_fax'], 109 "mobile" => $BL['be_profile_label_cellphone'], 110 "signature" => $BL['be_profile_label_signature'], 111 'notes' => $BL['be_profile_label_notes'], 112 "prof" => $BL['be_profile_label_profession'], 113 "newsletter" => $BL['be_profile_label_newsletter'], 114 "website" => $BL['be_profile_label_website'], 115 'gender' => $BL['be_profile_label_gender'], 116 'birthday' => $BL['be_profile_label_birthday'], 117 "varchar1" => $BL['be_cnt_field']['text'].' 1', 118 "varchar2" => $BL['be_cnt_field']['text'].' 2', 119 "varchar3" => $BL['be_cnt_field']['text'].' 3', 120 "varchar4" => $BL['be_cnt_field']['text'].' 4', 121 "varchar5" => $BL['be_cnt_field']['text'].' 5', 122 "text1" => $BL['be_cnt_field']['textarea'].' 1', 123 "text2" => $BL['be_cnt_field']['textarea'].' 2', 124 "text3" => $BL['be_cnt_field']['textarea'].' 3' 125 ); 126 127 $content['profile_fields_varchar'] = array( 128 "title" => $BL['be_profile_label_title'], 129 "firstname" => $BL['be_profile_label_firstname'], 130 "lastname" => $BL['be_profile_label_name'], 131 "company" => $BL['be_profile_label_company'], 132 "street" => $BL['be_profile_label_street'], 133 "add" => $BL['be_profile_label_add'], 134 "city" => $BL['be_profile_label_city'], 135 "zip" => $BL['be_profile_label_zip'], 136 "region" => $BL['be_profile_label_state'], 137 "country" => $BL['be_profile_label_country'], 138 "fon" => $BL['be_profile_label_phone'], 139 "fax" => $BL['be_profile_label_fax'], 140 "mobile" => $BL['be_profile_label_cellphone'], 141 "email" => $BL['be_profile_label_email'], 142 "password" => $BL['be_cnt_field']['password'], 143 "signature" => $BL['be_profile_label_signature'], 144 "prof" => $BL['be_profile_label_profession'], 145 "website" => $BL['be_profile_label_website'], 146 'gender' => $BL['be_profile_label_gender'], 147 "varchar1" => $BL['be_cnt_field']['text'].' 1', 148 "varchar2" => $BL['be_cnt_field']['text'].' 2', 149 "varchar3" => $BL['be_cnt_field']['text'].' 3', 150 "varchar4" => $BL['be_cnt_field']['text'].' 4', 151 "varchar5" => $BL['be_cnt_field']['text'].' 5' 152 ); 153 $content['profile_fields_longtext'] = array( 154 'notes' => $BL['be_profile_label_notes'], 155 "text1" => $BL['be_cnt_field']['textarea'].' 1', 156 "text2" => $BL['be_cnt_field']['textarea'].' 2', 157 "text3" => $BL['be_cnt_field']['textarea'].' 3' 158 ); 159 160 161 $for_select = ''; 162 $for_select_2 = ''; 163 164 // always disable switching content part for form - too complex settings and better to safe the user for himself 165 initMootools(); 166 $BE['BODY_CLOSE'][] = '<script language="javascript" type="text/javascript">document.getElementById("target_ctype").disabled = true;</script>'; 167 168 ?> 169 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /><input type="hidden" name="target_ctype" value="23" /></td></tr> 170 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 171 <tr> 172 <td align="right" class="chatlist"><?php echo $BL['be_msg_subject'] ?>: </td> 173 <td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0"> 174 <tr> 175 <td><select name="cform_subjectselect" class="v11" style="width:200px"> 176 177 <option value=""><?php echo $BL['be_msg_subject'] ?></option> 178 <?php 179 180 $cc_listing = ''; 181 $recipient_option = ''; 182 $sender_option = ''; 183 $sendername_option = ''; 184 $subject_option = ''; 185 186 if(isset($content['form']["fields"]) && is_array($content['form']["fields"]) && count($content['form']["fields"])) { 187 foreach($content['form']["fields"] as $key => $value) { 188 189 $for_copy = false; 190 $for_sendername = false; 191 $for_email = false; 192 $for_placeholder = true; 193 $for_subject = false; 194 $for_newsletter = false; 195 $for_name = html_specialchars($content['form']["fields"][$key]['name']); 196 197 switch($content['form']["fields"][$key]['type']) { 198 199 case 'text': $for_copy = true; 200 $for_sendername = true; 201 $for_subject = true; 202 break; 203 204 case 'email': $for_copy = true; 205 $for_email = true; 206 $for_sendername = true; 207 break; 208 209 case 'selectemail': $for_copy = true; 210 $for_email = true; 211 break; 212 213 case 'hidden': $for_copy = true; 214 $for_subject = true; 215 break; 216 217 case 'newsletter': $for_newsletter = true; 218 break; 219 220 case 'select': 221 case 'list': $for_subject = true; 222 break; 223 } 224 225 if($for_subject) { 226 227 $subject_option .= ' <option value="formfield_'.$for_name.'"'; 228 $subject_option .= is_selected($content['form']['subjectselect'], 'formfield_'.$content['form']['fields'][$key]['name'], 0, 0); 229 $subject_option .= '>'.$BL['be_cnt_guestbook_form'].': '.$for_name.'</option>'.LF; 230 231 } 232 233 if($for_copy) { 234 235 $cc_listing .= ' <option value="'.$for_name.'"'; 236 $cc_listing .= is_selected($content['form']["copyto"], $content['form']['fields'][$key]['name'], 0, 0); 237 $cc_listing .= '>'.$for_name.'</option>'.LF; 238 239 if($for_email) { 240 241 $recipient_option .= ' <option value="emailfield_'.$for_name.'"'; 242 $recipient_option .= is_selected($content['form']['targettype'], 'emailfield_'.$content['form']['fields'][$key]['name'], 0, 0); 243 $recipient_option .= '>'.$BL['be_cnt_guestbook_form'].': '.$for_name.'</option>'.LF; 244 245 $sender_option .= ' <option value="emailfield_'.$for_name.'"'; 246 $sender_option .= is_selected($content['form']['sendertype'], 'emailfield_'.$content['form']['fields'][$key]['name'], 0, 0); 247 $sender_option .= '>'.$BL['be_cnt_guestbook_form'].': '.$for_name.'</option>'.LF; 248 249 } 250 251 if($for_sendername) { 252 253 $sendername_option .= ' <option value="formfield_'.$for_name.'"'; 254 $sendername_option .= is_selected($content['form']['sendernametype'], 'formfield_'.$content['form']['fields'][$key]['name'], 0, 0); 255 $sendername_option .= '>'.$BL['be_cnt_guestbook_form'].': '.$for_name.'</option>'.LF; 256 257 } 258 259 } 260 261 262 // parallel building of the placeholder tag menu for the template 263 switch($content['form']["fields"][$key]['type']) { 264 265 case 'submit': $for_placeholder = false; 266 break; 267 268 case 'reset': $for_placeholder = false; 269 break; 270 271 case 'break': $for_placeholder = false; 272 break; 273 274 case 'breaktext': $for_placeholder = false; 275 break; 276 277 } 278 279 $for_select_2 .= '<option value="'; 280 $for_tempselect = ''; 281 if($for_placeholder) { 282 283 $for_select .= '<option value="{'.$for_name.'}">'; 284 if(!empty($content['form']["fields"][$key]['label'])) { 285 $for_select .= html_entities($content['form']["fields"][$key]['label']).' '; 286 $for_tempselect .= html_entities($content['form']["fields"][$key]['label']).' '; 287 } 288 $for_select .= '{'.$for_name."}</option>\n"; 289 290 $for_select_2 .= '{ERROR:'.$for_name.'}{LABEL:'.$for_name.'}'; 291 292 } 293 $for_select_2 .= '{'.$for_name.'}">'.$for_tempselect.'{'.$for_name."}</option>\n"; 294 295 } 296 } 297 298 echo $subject_option; 299 300 ?> 301 </select></td> 302 <td> </td> 303 <td><input name="cform_subject" type="text" id="cform_subject" class="f11b" style="width:230px" value="<?php echo html_entities($content['form']["subject"]) ?>" size="40" /></td> 304 </tr> 305 </table></td> 306 </tr> 307 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 308 <tr> 309 <td align="right" class="chatlist"><?php echo $BL['be_cnt_recipient'] ?>: </td> 310 <td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0"> 311 <tr> 312 <td><select name="cform_targettype" class="v11" style="width:200px"> 313 <?php 314 315 echo ' <option value="email"'. is_selected('email', $content['form']['targettype'],0,0) .'>'.$BL['be_profile_label_email'].'</option>'.LF; 316 echo $recipient_option; 317 ?> 318 319 </select></td> 320 <td> </td> 321 <td><input name="cform_target" type="text" id="cform_target" class="f11b" style="width:230px" value="<?php echo html_entities($content['form']["target"]) ?>" size="40" /></td> 322 </tr> 323 </table></td> 324 </tr> 325 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 326 <tr> 327 <td align="right" class="chatlist"><?php echo $BL['be_newsletter_fromemail'] ?>: </td> 328 <td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0"> 329 <tr> 330 <td><select name="cform_sendertype" class="v11 width200"> 331 <?php 332 echo ' <option value="email"'. is_selected('email', $content['form']['sendertype'],0,0) .'>'.$BL['be_profile_label_email'].'</option>'.LF; 333 echo ' <option value="system"'. is_selected('system', $content['form']['sendertype'],0,0) .'>'.$BL['be_cnt_sysadmin_system'].': '.html_entities($phpwcms['SMTP_FROM_EMAIL']).'</option>'.LF; 334 335 echo $sender_option; 336 ?> 337 </select></td> 338 <td> </td> 339 <td><input name="cform_sender" type="text" id="cform_sender" class="f11b" style="width:230px" value="<?php echo html_entities($content['form']['sender']) ?>" size="40" /></td> 340 </tr> 341 </table></td> 342 </tr> 343 344 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 345 <tr> 346 <td align="right" class="chatlist"><?php echo $BL['be_newsletter_fromname'] ?>: </td> 347 <td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0"> 348 <tr> 349 <td><select name="cform_sendernametype" class="v11 width200"> 350 <?php 351 echo ' <option value="custom"'. is_selected('custom', $content['form']['sendernametype'],0,0) .'>'.$BL['be_cnt_ecardform_name'].'</option>'.LF; 352 echo ' <option value="system"'. is_selected('system', $content['form']['sendernametype'],0,0) .'>'.$BL['be_cnt_sysadmin_system'].': '.html_entities($phpwcms['SMTP_FROM_NAME']).'</option>'.LF; 353 354 echo $sendername_option; 355 ?> 356 </select></td> 357 <td> </td> 358 <td><input name="cform_sendername" type="text" id="cform_sendername" class="f11b" style="width:230px" value="<?php echo html_specialchars($content['form']['sendername']) ?>" size="40" /></td> 359 </tr> 360 </table></td> 361 </tr> 362 363 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr> 364 365 <tr> 366 <td align="right" class="chatlist"><?php echo $BL['be_cnt_send_copy_to']?>: </td> 367 <td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0"> 368 <tr> 369 <td bgcolor="#E7E8EB"><input type="checkbox" name="cform_sendcopy" value="1"<?php echo is_checked('1', $content['form']["sendcopy"], 0, 0) ?> title="send copy to selected field" /></td> 370 <td><select name="cform_copyto" class="v11" style="width:180px;"> 371 <?php echo $cc_listing; ?> 372 </select></td> 373 <td> </td> 374 <td><input name="cform_cc" type="text" id="cform_cc" class="f11b" style="width:230px" value="<?php echo html_specialchars($content['form']['cc']) ?>" size="40" /></td> 375 </tr> 376 </table></td> 377 </tr> 378 379 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr> 380 381 <tr> 382 <td align="right"> </td> 383 <td><table summary="" cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB"> 384 <tr> 385 <td><input type="checkbox" name="cform_checktofrom" id="cform_checktofrom" value="1" <?php is_checked(1, $content['form']['checktofrom']) ?> /></td> 386 <td class="v10"><label for="cform_checktofrom"> <?php echo $BL['be_cnt_field']['checktofrom'] ?></label> </td> 387 </tr> 388 </table> 389 </td> 390 </tr> 391 392 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 393 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 394 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 395 396 397 <tr> 398 <td align="right" class="chatlist tdtop4"><?php echo $BL['be_cnt_database'] ?>: </td> 399 <td><?php 400 401 // check form entries 402 if($content["id"]) { 403 404 $entries = _dbQuery('SELECT COUNT(*) FROM '.DB_PREPEND.'phpwcms_formresult WHERE formresult_pid='.$content['id'], 'COUNT'); 405 406 // yepp - available - link to export script 407 if($entries > 0) { 408 409 echo '<div style="float:right;padding-right:10px;">'; 410 echo "<button onclick=\"window.open('include/inc_act/act_export.php?action=exportformresult&fid="; 411 echo $content['id']."', 'Zweitfenster');\" class=\"f11b\" style=\"padding: 2px 6px 2px 4px\">"; 412 echo '<img src="img/icons/small_icon_xls.gif" alt="Excel Sheet" style="position: relative; top:1;" /> '; 413 echo $BL['be_cnt_download'].'<span style="font-weight:normal;"> ('.$entries.')</span></button></div>'; 414 415 } 416 417 } 418 ?><table summary="" cellpadding="0" cellspacing="0" border="0"> 419 <tr> 420 <td bgcolor="#E7E8EB"><input type="checkbox" name="cform_savedb" id="cform_savedb" value="1" <?php echo is_checked(1, $content['form']["savedb"], 0, 0) ?> /></td> 421 <td class="v10" bgcolor="#E7E8EB"><label for="cform_savedb"> <?php echo $BL['be_cnt_formsave_in_db'] ?></label> </td> 422 </tr> 423 <tr> 424 <td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td> 425 </tr> 426 <tr> 427 <td bgcolor="#E7E8EB"><input type="checkbox" name="cform_saveprofile" id="cform_saveprofile" value="1" <?php echo is_checked(1, $content['form']["saveprofile"], 0, 0) ?> onchange="this.form.submit();" /></td> 428 <td class="v10" bgcolor="#E7E8EB"><label for="cform_saveprofile"> <?php echo $BL['be_cnt_formsave_profile'] ?></label> </td> 429 </tr> 430 <tr> 431 <td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td> 432 </tr> 433 <tr> 434 <td bgcolor="#E7E8EB"><input type="checkbox" name="cform_tracking_off" id="cform_tracking_off" value="1" <?php echo is_checked(1, $content['form']["formtracking_off"], 0, 0) ?> /></td> 435 <td class="v10" bgcolor="#E7E8EB"><label for="cform_tracking_off"> <?php echo $BL['be_cnt_field']['formtracking_off'] ?></label> </td> 436 </tr> 437 </table> 438 </td> 439 </tr> 440 441 442 443 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 444 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 445 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 446 447 <tr> 448 <td align="right" class="chatlist" valign="top"><img src="img/leer.gif" alt="" width="1" height="15" /><?php echo $BL['be_admin_tmpl_default'] ?>: </td> 449 <td> 450 <table summary="" cellpadding="1" cellspacing="0" border="0"> 451 <tr bgcolor="#E7E8EB"> 452 <td><input type="radio" name="cform_startup_html" id="cform_startup_html0" value="0"<?php echo is_checked('0', $content['form']["startup_html"], 0, 0) ?> title="Text" /></td> 453 <td class="v10"><label for="cform_startup_html0">Text </label> </td> 454 <td><input type="radio" name="cform_startup_html" id="cform_startup_html1" value="1"<?php echo is_checked('1', $content['form']["startup_html"], 0, 0) ?> title="HTML" /></td> 455 <td class="v10"><label for="cform_startup_html1">HTML </label> </td> 456 </tr> 457 </table> 458 <textarea name="cform_startup" id="cform_startup" rows="5" class="f11" style="width:440px;"><?php echo html_entities($content['form']["startup"]) ?></textarea></td> 459 </tr> 460 461 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 462 463 <tr> 464 <td align="right" class="chatlist" valign="top"><img src="img/leer.gif" alt="" width="1" height="15" /><?php echo $BL['be_cnt_onsuccess'] ?>: </td> 465 <td><table summary="" cellpadding="0" cellspacing="0" border="0"> 466 <tr bgcolor="#E7E8EB"> 467 <td><input type="radio" name="cform_onsuccess_redirect" id="cform_onsuccess_redirect0" value="0"<?php echo is_checked('0', $content['form']["onsuccess_redirect"], 0, 0) ?> title="redirect on success" /></td> 468 <td class="v10"><label for="cform_onsuccess_redirect0">Text </label> </td> 469 <td><input type="radio" name="cform_onsuccess_redirect" id="cform_onsuccess_redirect2" value="2"<?php echo is_checked('2', $content['form']["onsuccess_redirect"], 0, 0) ?> title="redirect on success" /></td> 470 <td class="v10"><label for="cform_onsuccess_redirect2">HTML </label> </td> 471 <?php 472 if($for_select != '') { 473 echo '<td style="padding:2px;"><select name="successInfo" id="successInfo" class="v10 width200" '; 474 echo 'onChange="insertAtCursorPos(document.articlecontent.cform_onsuccess, '; 475 echo 'document.articlecontent.successInfo.options[document.articlecontent.successInfo.selectedIndex].value);">'; 476 echo $for_select; 477 echo '<option value="{REMOTE_IP}">{REMOTE_IP}</option>'.LF; 478 echo '</select></td>'; 479 echo '<td style="padding-right:3px;"><img src="img/button/go04.gif" alt="" width="15" height="15" title="insert field placeholder" border="0" '; 480 echo 'onclick="insertAtCursorPos(document.articlecontent.cform_onsuccess, '; 481 echo 'document.articlecontent.successInfo.options[document.articlecontent.successInfo.selectedIndex].value);" style="margin:3px;" /></td>'; 482 } 483 ?> 484 <td bgcolor="#FFFFFF"> </td> 485 <td><input type="radio" name="cform_onsuccess_redirect" id="cform_onsuccess_redirect1" value="1"<?php echo is_checked('1', $content['form']["onsuccess_redirect"], 0, 0) ?> title="redirect on success" /></td> 486 <td class="v10"><label for="cform_onsuccess_redirect1">Redirect</label> </td> 487 488 489 490 </tr> 491 </table> 492 <textarea name="cform_onsuccess" id="cform_onsuccess" rows="3" class="f11" style="font-size:11px;width:440px;"><?php echo html_entities($content['form']["onsuccess"]) ?></textarea> 493 </td> 494 </tr> 495 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 496 <tr> 497 <td align="right" class="chatlist" valign="top"><img src="img/leer.gif" alt="" width="1" height="15" /><?php echo $BL['be_cnt_onerror'] ?>: </td> 498 <td><table summary="" cellpadding="1" cellspacing="0" border="0"> 499 <tr bgcolor="#E7E8EB"> 500 <td><input type="radio" name="cform_onerror_redirect" id="cform_onerror_redirect0" value="0"<?php echo is_checked('0', $content['form']["onerror_redirect"], 0, 0) ?> title="redirect on success" /></td> 501 <td class="v10"><label for="cform_onerror_redirect0">Text </label> </td> 502 <td><input type="radio" name="cform_onerror_redirect" id="cform_onerror_redirect2" value="2"<?php echo is_checked('2', $content['form']["onerror_redirect"], 0, 0) ?> title="redirect on success" /></td> 503 <td class="v10"><label for="cform_onerror_redirect2">HTML </label> </td> 504 <td bgcolor="#FFFFFF" style="padding-bottom: 5px;"> </td> 505 <td><input type="radio" name="cform_onerror_redirect" id="cform_onerror_redirect1" value="1"<?php echo is_checked('1', $content['form']["onerror_redirect"], 0, 0) ?> title="redirect on success" /></td> 506 <td class="v10"><label for="cform_onerror_redirect1">Redirect</label> 507 </td> 508 </tr> 509 </table> 510 <textarea name="cform_onerror" rows="3" class="f11" style="font-size:11px;width:440px;"><?php echo html_entities($content['form']["onerror"]) ?></textarea> 511 </td> 512 </tr> 513 514 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10" /></td></tr> 515 516 <tr><td colspan="2"> 517 518 <table summary="" cellpadding="0" cellspacing="1" border="0"> 519 520 <tr bgcolor="#DAE4ED"><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 521 522 <tr bgcolor="#E7E8EB"> 523 <td colspan="2" class="chatlist" align="right"><?php echo $BL['be_cnt_reference_basis'] ?>: </td> 524 <td colspan="6" style="padding:3px 0 3px 0"><table summary="" cellpadding="0" cellspacing="0" border="0"> 525 <tr> 526 <?php 527 if(!isset($content['form']["labelpos"])) { 528 $content['form']["labelpos"] = 0; 529 // 0 = default = in front of form field 530 // 1 = above form field 531 } 532 ?> 533 <td><input type="radio" name="cform_labelpos" id="cform_labelpos0" value="0"<?php echo is_checked(0, $content['form']["labelpos"], 0, 1) ?> /></td> 534 <td><label for="cform_labelpos0"><img src="img/symbole/label_1.gif" width="70" height="22" alt="" /></label></td> 535 536 <td> </td> 537 <td><input type="radio" name="cform_labelpos" id="cform_labelpos1" value="1"<?php echo is_checked(1, $content['form']["labelpos"], 0, 1) ?> /></td> 538 <td><label for="cform_labelpos1"><img src="img/symbole/label_2.gif" width="60" height="22" alt="" /></label></td> 539 540 <td> </td> 541 <td><input type="radio" name="cform_labelpos" id="cform_labelpos2" value="2"<?php echo is_checked(2, $content['form']["labelpos"], 0, 1) ?> /></td> 542 <td><label for="cform_labelpos2"><img src="img/symbole/label_3.gif" width="60" height="22" alt="" /></label></td> 543 </tr> 544 </table></td> 545 </tr> 546 <tr bgcolor="#DAE4ED"><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 547 <tr><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 548 549 550 <tr> 551 <td colspan="2" class="chatlist" align="right"><?php echo $BL['be_cnt_form_class'] ?>: </td> 552 <td><input type="text" name="cform_class" class="v10" style="width:120px;" value="<?php echo (isset($content['form']["class"]) ? html_specialchars($content['form']["class"]) : '') ?>" /></td> 553 <td class="chatlist" align="right"> <?php echo $BL['be_cnt_label_wrap'] ?>: </td> 554 <td colspan="4"><input type="text" name="cform_label_wrap" class="v10" style="width:81px;" value="<?php echo (isset($content['form']["label_wrap"]) ? html_entities($content['form']["label_wrap"]) : '|') ?>" /></td> 555 </tr> 556 557 <tr> 558 <td colspan="2" class="chatlist" align="right"><?php echo $BL['be_cnt_req_mark'] ?>: </td> 559 <td><input type="text" name="cform_reqmark" class="v10" style="width:120px;" value="<?php echo (isset($content['form']["cform_reqmark"]) ? html_entities($content['form']["cform_reqmark"]) : '*') ?>" /></td> 560 <td class="chatlist" align="right"> <?php echo $BL['be_cnt_error_class'] ?>: </td> 561 <td colspan="4"><input type="text" name="cform_error_class" class="v10" style="width:81px;" value="<?php echo (isset($content['form']["error_class"]) ? html_specialchars($content['form']["error_class"]) : '') ?>" /></td> 562 </tr> 563 564 <tr><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 565 <tr bgcolor="#DAE4ED"><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 566 <tr bgcolor="#E6ECF2"> 567 <td style="width:30px"> </td> 568 <td class="chatlist" style="padding: 1px"> <?php echo $BL['be_cnt_type'] ?>:</td> 569 <td class="chatlist" style="padding: 1px"> <?php echo $BL['be_newsletter_name'] ?>:</td> 570 <td class="chatlist" style="padding: 1px"> <?php echo $BL['be_cnt_label'] ?>:</td> 571 <td class="chatlist" title="size/columns" style="padding: 1px"> S/C:</td> 572 <td class="chatlist" title="maxlength/rows" style="padding: 1px"> M/R:</td> 573 <td align="center" style="padding: 1px"><img src="img/article/fill_in_here.gif" alt="<?php echo $BL['be_cnt_needed'] ?>" title="<?php echo $BL['be_cnt_needed'] ?>" border="0" /></td> 574 <td align="center" style="padding: 1px"><img src="img/button/trash_13x13_1.gif" alt="<?php echo $BL['be_cnt_delete'] ?>" title="<?php echo $BL['be_cnt_delete'] ?>" border="0" /></td> 575 </tr> 576 <?php 577 if(isset($content['form']["fields"]) && is_array($content['form']["fields"]) && count($content['form']["fields"])) { 578 579 $field_counter = 1; 580 $field_max = count($content['form']["fields"]); 581 $field_js = array( 'showAll' => array(), 'hideAll' => array(), 'varcharFields' => array(), 'longtextFields' => array() ); 582 583 foreach($content['form']["fields"] as $key => $value) { 584 585 $field_bg = ($field_counter % 2) ? '' : ' bgcolor="#F3F5F8"'; 586 $field_row4 = ''; 587 588 // generate javascript code part 1 589 $field_js['showAll'][$key] = ' showHide_CntFormfieldRow(\'formRow_'.$field_counter.'\', \'block\''; 590 $field_js['hideAll'][$key] = ' showHide_CntFormfieldRow(\'formRow_'.$field_counter.'\', \'none\''; 591 592 echo '<tr'.$field_bg.'>'.LF; 593 echo '<td align="center" id="formRow_'.$field_counter.'">'; 594 echo '<a href="#" onclick="return showHide_CntFormfieldRow(\'formRow_'.$field_counter.'\', \'none\''; 595 596 // some field specific checks and settings 597 switch($content['form']["fields"][$key]['type']) { 598 599 case 'newsletter': // default hide/show 600 echo ', 4'; 601 602 $field_row4 = '<tr'.$field_bg.' id="formRow_'.$field_counter.'_4">'.LF; 603 $field_row4 .= '<td colspan="2" class="chatlist" align="right" valign="top"> <img src="img/leer.gif" width="1" height="15" alt="" />'; 604 $field_row4 .= $BL['be_cnt_bid_verifyemail'].': </td>'.LF; 605 $field_row4 .= '<td colspan="6"><textarea name="cform_field_verifyemail" '; 606 $field_row4 .= 'id="cform_field_verifyemail" rows="5" class="code" style="font-size:11px;width:323px;" wrap="off">'; 607 $field_row4 .= html_entities($content['form']['verifyemail']).'</textarea></td>'; 608 $field_row4 .= LF.'</tr>'.LF; 609 610 $field_js['showAll'][$key] .= ', 4'; 611 $field_js['hideAll'][$key] .= ', 4'; 612 613 break; 614 615 case 'text': 616 case 'special': 617 case 'email': 618 case 'password': 619 case 'hidden': 620 case 'select': 621 case 'selectemail': 622 case 'country': 623 case 'radio': // default hide/show 624 if($content['form']["saveprofile"]) { 625 echo ', 4'; 626 627 $field_row4 = '<tr'.$field_bg.' id="formRow_'.$field_counter.'_4">'.LF; 628 $field_row4 .= '<td colspan="2" class="chatlist" align="right">'.$BL['be_cnt_store_in'].': </td>'.LF; 629 $field_row4 .= '<td colspan="6" id="cform_field_profile_'.$field_counter.'_td">'; 630 631 if(!empty($content['form']["fields"][$key]['profile']) && isset($content['profile_fields_varchar'][ $content['form']["fields"][$key]['profile'] ])) { 632 633 $field_js['varcharFields'][$field_counter] = '<"+"option value=\"'.$content['form']["fields"][$key]['profile'].'\" selected=\"selected\">'; 634 $field_js['varcharFields'][$field_counter] .= $content['profile_fields_varchar'][ $content['form']["fields"][$key]['profile'] ].'<"+"/option>'; 635 unset($content['profile_fields_varchar'][ $content['form']["fields"][$key]['profile'] ]); 636 637 } else { 638 639 $field_js['varcharFields'][$field_counter] = ''; 640 641 } 642 643 $field_row4 .= '</td>'.LF.'</tr>'.LF; 644 645 $field_js['showAll'][$key] .= ', 4'; 646 $field_js['hideAll'][$key] .= ', 4'; 647 } 648 break; 649 650 651 case 'textarea': 652 case 'checkbox': 653 case 'list': // default hide/show 654 if($content['form']["saveprofile"]) { 655 echo ', 4'; 656 657 $field_row4 = '<tr'.$field_bg.' id="formRow_'.$field_counter.'_4">'.LF; 658 $field_row4 .= '<td colspan="2" class="chatlist" align="right">'.$BL['be_cnt_store_in'].': </td>'.LF; 659 $field_row4 .= '<td colspan="6" id="cform_field_profile_'.$field_counter.'_td">'; 660 661 if(!empty($content['form']["fields"][$key]['profile']) && isset($content['profile_fields_longtext'][ $content['form']["fields"][$key]['profile'] ])) { 662 663 $field_js['longtextFields'][$field_counter] = '<"+"option value=\"'.$content['form']["fields"][$key]['profile'].'\" selected=\"selected\">'; 664 $field_js['longtextFields'][$field_counter] .= $content['profile_fields_longtext'][ $content['form']["fields"][$key]['profile'] ].'<"+"/option>'; 665 unset($content['profile_fields_longtext'][ $content['form']["fields"][$key]['profile'] ]); 666 667 } else { 668 669 $field_js['longtextFields'][$field_counter] = ''; 670 } 671 672 $field_row4 .= '</td>'.LF.'</tr>'.LF; 673 674 $field_js['showAll'][$key] .= ', 4'; 675 $field_js['hideAll'][$key] .= ', 4'; 676 } 677 break; 678 679 680 case 'mathspam': $mathspam = $content['form']["fields"][$key]['value']; 681 $content['form']["fields"][$key]['value'] = ''; 682 683 foreach($mathspam as $item_key => $item) { 684 685 $content['form']["fields"][$key]['value'] .= $item_key . ' = ' . $item . LF; 686 687 } 688 $content['form']["fields"][$key]['value'] = trim($content['form']["fields"][$key]['value']); 689 } 690 691 echo ')"><img src="img/button/arrow_opened.gif" alt="" border="0" /></a>'; 692 echo '</td>'.LF.'<td>'; 693 echo '<select name="cform_field_type['.$field_counter.']" class="v10" style="width:140px">'.LF; 694 echo '<option value="text"'. is_selected('text', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['text'].'</option>'.LF; 695 echo '<option value="textarea"'. is_selected('textarea', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['textarea'].'</option>'.LF; 696 echo '<option value="special"'. is_selected('special', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['special'].'</option>'.LF; 697 echo '<option value="hidden"'. is_selected('hidden', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['hidden'].'</option>'.LF; 698 echo '<option value="password"'. is_selected('password', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['password'].'</option>'.LF; 699 echo '<option value="email"'. is_selected('email', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['email'].'</option>'.LF; 700 echo '<option value="selectemail"'. is_selected('selectemail', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['selectemail'].'</option>'.LF; 701 echo '<option value="select"'. is_selected('select', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['select'].'</option>'.LF; 702 echo '<option value="country"'. is_selected('country', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['country'].'</option>'.LF; 703 echo '<option value="list"'. is_selected('list', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['list'].'</option>'.LF; 704 echo '<option value="newsletter"'. is_selected('newsletter', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['newsletter'].'</option>'.LF; 705 echo '<option value="checkbox"'. is_selected('checkbox', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['checkbox'].'</option>'.LF; 706 echo '<option value="radio"'. is_selected('radio', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['radio'].'</option>'.LF; 707 echo '<option value="upload"'. is_selected('upload', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['upload'].'</option>'.LF; 708 echo '<option value="captcha"'. is_selected('captcha', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['captcha'].'</option>'.LF; 709 echo '<option value="captchaimg"'. is_selected('captchaimg', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['captchaimg'].'</option>'.LF; 710 echo '<option value="mathspam"'. is_selected('mathspam', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['mathspam'].'</option>'.LF; 711 echo '<option value="submit"'. is_selected('submit', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['submit'].'</option>'.LF; 712 echo '<option value="reset"'. is_selected('reset', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['reset'].'</option>'.LF; 713 echo '<option value="break"'. is_selected('break', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['break'].'</option>'.LF; 714 echo '<option value="breaktext"'. is_selected('breaktext', $content['form']["fields"][$key]['type'], 0, 0) .'>'.$BL['be_cnt_field']['breaktext'].'</option>'.LF; 715 echo '</select></td>'; 716 717 echo '<td><input type="text" name="cform_field_name['.$field_counter.']" class="v10" style="width:120px;" value="'; 718 echo html_entities($content['form']["fields"][$key]['name']).'"></td>'.LF; 719 echo '<td><input type="text" name="cform_field_label['.$field_counter.']" class="v10" style="width:120px;" value="'; 720 echo html_entities($content['form']["fields"][$key]['label']).'"></td>'.LF; 721 echo '<td><input type="text" name="cform_field_size['.$field_counter.']" class="v10" style="width:40px;" value="'; 722 echo html_entities($content['form']["fields"][$key]['size']).'"title="SIZE for Text/COLUMNS for Textarea"></td>'.LF; 723 echo '<td><input type="text" name="cform_field_max['.$field_counter.']" class="v10" style="width:40px;" value="'; 724 echo html_entities($content['form']["fields"][$key]['max']).'" title="MAXLENGTH for Text/ROWS for Textarea and List"></td>'.LF; 725 echo '<td><input type="checkbox" name="cform_field_required['.$field_counter.']"'; 726 echo is_checked('1', $content['form']["fields"][$key]['required'], 0, 0).' value="1" title="'.$BL['be_cnt_mark_as_req'].'"></td>'.LF; 727 echo '<td><input type="checkbox" name="cform_field_delete['.$field_counter.']" value="1" title="'.$BL['be_cnt_mark_as_del'].'"></td>'; 728 echo "\n</tr>\n"; 729 730 731 echo '<tr'.$field_bg.' id="formRow_'.$field_counter.'_1"><td> </td>'; 732 echo '<td valign="top"><table summary="" cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td valign="top">'; 733 echo '<img src="img/leer.gif" width="3" height="17" alt="" />'; 734 if($field_counter != 1) { 735 echo '<a href="#" onclick="document.articlecontent.cform_order_'.$field_counter.'.value=\''; 736 echo ($field_counter-1).'\';document.articlecontent.cform_order_'.($field_counter-1); 737 echo '.value=\''.$field_counter.'\';document.articlecontent.submit();return false;">'; 738 echo '<img src="img/button/sort_top_1.gif" border="0" alt="" width="11" height="11" />'; 739 echo '</a>'; 740 } else { 741 echo '<img src="img/button/sort_top_0.gif" border="0" alt="" width="11" height="11" />'; 742 } 743 echo '<img src="img/leer.gif" width="1" height="1" alt="" />'; 744 if($field_max != $field_counter) { 745 echo '<a href="#" onclick="document.articlecontent.cform_order_'.$field_counter.'.value=\''; 746 echo ($field_counter+1).'\';document.articlecontent.cform_order_'.($field_counter+1); 747 echo '.value=\''.$field_counter.'\';document.articlecontent.submit();return false;">'; 748 echo '<img src="img/button/sort_bottom_1.gif" border="0" alt="" width="11" height="11" />'; 749 echo '</a>'; 750 } else { 751 echo '<img src="img/button/sort_bottom_0.gif" border="0" alt="" width="11" height="11" />'; 752 } 753 echo '<input type="hidden" name="cform_order['.$field_counter.']" id="cform_order_'.$field_counter.'" value="'.$field_counter.'">'; 754 echo '</td><td class="chatlist" align="right" valign="top"><a name="field_value_'.$field_counter.'"></a>'; 755 echo '<img src="img/leer.gif" width="1" height="15" alt="" />'.$BL['be_cnt_value'].': '; 756 echo "</td></tr></table></td>\n"; 757 758 echo '<td colspan="4"><textarea name="cform_field_value['.$field_counter.']" '; 759 echo 'id="cform_field_value_'.$field_counter.'" rows="5" class="code" style="font-size:11px;width:323px;">'; 760 echo html_entities($content['form']["fields"][$key]['value']).'</textarea>'; 761 762 echo '</td>'; 763 echo '<td colspan="2" valign="bottom"><div style="padding:2px"><a href="#field_value_'.$field_counter.'" '; 764 echo "onclick=\"contractField('cform_field_value_".$field_counter."', 'V')\">"; 765 echo '<img src="img/button/minus_11x11.gif" border="0" alt="-" width="11" height="11"></a><br />'; 766 echo '<a href="#field_value_'.$field_counter.'" '; 767 echo "onclick=\"growField('cform_field_value_".$field_counter."', 'V')\">"; 768 echo '<img src="img/button/add_11x11.gif" border="0" alt="+" width="11" height="11"></a></div></td>'; 769 echo '</tr>'.LF; 770 771 echo '<tr'.$field_bg.' id="formRow_'.$field_counter.'_2">'; 772 echo '<td colspan="2" class="chatlist" align="right"> '.$BL['be_cnt_error_text'].': </td>'; 773 echo '<td colspan="6"><input type="text" name="cform_field_error['.$field_counter.']" value="'; 774 echo html_entities($content['form']["fields"][$key]['error']).'" class="v10" style="width:323px;"'; 775 if($content['form']["fields"][$key]['type'] == 'upload') { 776 echo ' title="{MAXLENGTH}, {FILESIZE}, {FILENAME}, {FILEEXT}"'; 777 } 778 echo '></td>'.LF.'</tr>'.LF.'<tr'.$field_bg.' id="formRow_'.$field_counter.'_3">'; 779 echo '<td colspan="2" class="chatlist" align="right"> '.$BL['be_cnt_css_class'].': </td>'; 780 echo '<td><input type="text" name="cform_field_class['.$field_counter.']" value="'; 781 echo html_entities($content['form']["fields"][$key]['class']).'" class="v10" style="width:120px;"></td>'.LF; 782 echo '<td colspan="5"><table summary="" cellpadding="0" cellspacing="0" border="0" style="width:202px;"><tr> 783 <td class="chatlist" style="width:82px;" align="right"> '.$BL['be_cnt_css_style'].': </td> 784 <td style="width:120px;"><input type="text" name="cform_field_style['.$field_counter.']" value="'; 785 echo html_entities($content['form']["fields"][$key]['style']).'" class="v10" style="width:120px;"></td></tr></table></td>'; 786 787 echo "\n</tr>\n"; 788 789 // if field row 4 790 echo $field_row4; 791 792 echo '<tr bgcolor="#DAE4ED"><td colspan="8"><img src="img/leer.gif" width="1" height="1" alt="" /></td></tr>'; 793 794 795 // generate javascript code part 2 796 $field_js['showAll'][$key] .= ');'; 797 $field_js['hideAll'][$key] .= ');'; 798 799 $field_counter++; 800 } 801 802 } 803 804 ?> 805 <tr bgcolor="#E7E8EB"> 806 <td> </td> 807 <td><select name="cform_field_type[0]" class="v10" style="width:140px" onchange="setFieldValue(this);"> 808 <option value="text"><?php echo $BL['be_cnt_field']['text'] ?></option> 809 <option value="textarea"><?php echo $BL['be_cnt_field']['textarea'] ?></option> 810 <option value="special"><?php echo $BL['be_cnt_field']['special'] ?></option> 811 <option value="hidden"><?php echo $BL['be_cnt_field']['hidden'] ?></option> 812 <option value="password"><?php echo $BL['be_cnt_field']['password'] ?></option> 813 <option value="email"><?php echo $BL['be_cnt_field']['email'] ?></option> 814 <option value="selectemail"><?php echo $BL['be_cnt_field']['selectemail'] ?></option> 815 <option value="select"><?php echo $BL['be_cnt_field']['select'] ?></option> 816 <option value="country"><?php echo $BL['be_cnt_field']['country'] ?></option> 817 <option value="list"><?php echo $BL['be_cnt_field']['list'] ?></option> 818 <?php 819 if(empty($for_newsletter)) { 820 ?> 821 <option value="newsletter"><?php echo $BL['be_cnt_field']['newsletter'] ?></option> 822 <?php 823 } 824 ?> 825 <option value="checkbox"><?php echo $BL['be_cnt_field']['checkbox'] ?></option> 826 <option value="radio"><?php echo $BL['be_cnt_field']['radio'] ?></option> 827 <option value="upload"><?php echo $BL['be_cnt_field']['upload'] ?></option> 828 <option value="captcha"><?php echo $BL['be_cnt_field']['captcha'] ?></option> 829 <option value="captchaimg"><?php echo $BL['be_cnt_field']['captchaimg'] ?></option> 830 <option value="mathspam"><?php echo $BL['be_cnt_field']['mathspam'] ?></option> 831 <option value="submit"><?php echo $BL['be_cnt_field']['submit'] ?></option> 832 <option value="reset"><?php echo $BL['be_cnt_field']['reset'] ?></option> 833 <option value="break"><?php echo $BL['be_cnt_field']['break'] ?></option> 834 <option value="breaktext"><?php echo $BL['be_cnt_field']['breaktext'] ?></option> 835 </select></td> 836 <td><input type="text" name="cform_field_name[0]" class="v10" style="width:120px;" /></td> 837 <td><input type="text" name="cform_field_label[0]" class="v10" style="width:120px;" /></td> 838 <td><input type="text" name="cform_field_size[0]" class="v10" style="width:40px;" title="SIZE for Text/COLUMNS for Textarea" /></td> 839 <td><input type="text" name="cform_field_max[0]" class="v10" style="width:40px;" title="MAXLENGTH for Text/ROWS for Textarea and List" /></td> 840 <td><input type="checkbox" name="cform_field_required[0]" value="1" title="mark as required field" /></td> 841 <td> 842 <input type="hidden" name="cform_order[0]" value="<?php echo $field_counter?>" /></td> 843 </tr> 844 <tr bgcolor="#E7E8EB"> 845 <td colspan="2" class="chatlist" valign="top" align="right"><a name="field_value_0" id="field_value_0"></a> <img src="img/leer.gif" alt="" width="1" height="15" /><?php echo $BL['be_cnt_value'] ?>: </td> 846 <td colspan="4"><textarea name="cform_field_value[0]" id="cform_field_value_0" rows="5" class="code" style="font-size:11px;width:323px;"></textarea></td> 847 <td colspan="2" valign="bottom"><div style="padding:2px"><a href="#field_value_0" onclick="contractField('cform_field_value_0', 'V')"><img src="img/button/minus_11x11.gif" border="0" alt="-" width="11" height="11" /></a><br /> 848 <a href="#field_value_0" onclick="growField('cform_field_value_0', 'V')"><img src="img/button/add_11x11.gif" border="0" alt="+" width="11" height="11" /></a></div></td> 849 </tr> 850 <tr bgcolor="#E7E8EB"> 851 <td colspan="2" class="chatlist" align="right"> <?php echo $BL['be_cnt_error_text'] ?>: </td> 852 <td colspan="6"><input type="text" name="cform_field_error[0]" class="v10" style="width:323px;" /></td> 853 </tr> 854 <tr bgcolor="#E7E8EB"> 855 <td colspan="2" class="chatlist" align="right"> <?php echo $BL['be_cnt_css_class'] ?>: </td> 856 <td><input type="text" name="cform_field_class[0]" class="v10" style="width:120px;" /></td> 857 <td colspan="5"><table summary="" cellpadding="0" cellspacing="0" border="0" style="width:202px;"> 858 <tr> 859 <td class="chatlist" style="width:82px;" align="right"> <?php echo $BL['be_cnt_css_style'] ?>: </td> 860 <td style="width:120px;"><input type="text" name="cform_field_style[0]" class="v10" style="width:120px;" /></td> 861 </tr> 862 </table></td> 863 </tr> 864 <tr bgcolor="#DAE4ED"><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 865 <tr><td colspan="8"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 866 <tr><td colspan="2"> </td><td colspan="6"><input type="submit" value="<?php echo $BL['be_article_cnt_button1'] ?>" class="v09" /></td></tr> 867 868 </table><?php 869 870 if(!empty($field_counter) && $field_counter > 1) { 871 872 echo '<script language="javascript" type="text/javascript">'.LF.'<!--'.LF; 873 874 echo 'function hideAllFormFields() {'.LF; 875 echo implode(LF, $field_js['hideAll']); 876 echo LF.'}'.LF; 877 878 echo 'function showAllFormFields() {'.LF; 879 echo implode(LF, $field_js['showAll']); 880 echo LF.'}'.LF.LF; 881 882 echo 'hideAllFormFields();'.LF.LF; 883 884 885 // set options lists 886 if($content['form']["saveprofile"]) { 887 888 $field_js['options'] = ''; 889 foreach($content['profile_fields_varchar'] as $fieldKey => $fieldValue) { 890 $field_js['options'] .= '<"+"option value=\"'.$fieldKey.'\">'.$fieldValue.'<"+"/option>'; 891 } 892 893 foreach($field_js['varcharFields'] as $tdID => $tdIDvalue) { 894 895 $field_value = 'document.getElementById("cform_field_profile_'.$tdID.'_td").innerHTML = "'; 896 $field_value .= '<"+"select name=\"cform_field_profile['.$tdID.']\" id=\"cform_field_profile_'.$tdID.'\" class=\"v10\">'; 897 $field_value .= '<"+"option value=\"\">-<"+"/option>'; 898 $field_value .= $tdIDvalue; 899 $field_value .= $field_js['options']; 900 $field_value .= '<"+"/select>";'.LF; 901 902 echo $field_value; 903 904 } 905 906 $field_js['options'] = ''; 907 foreach($content['profile_fields_longtext'] as $fieldKey => $fieldValue) { 908 $field_js['options'] .= '<"+"option value=\"'.$fieldKey.'\">'.$fieldValue.'<"+"/option>'; 909 } 910 911 foreach($field_js['longtextFields'] as $tdID => $tdIDvalue) { 912 913 $field_value = 'document.getElementById("cform_field_profile_'.$tdID.'_td").innerHTML = "'; 914 $field_value .= '<"+"select name=\"cform_field_profile['.$tdID.']\" id=\"cform_field_profile_'.$tdID.'\" class=\"v10\">'; 915 $field_value .= '<"+"option value=\"\">-<"+"/option>'; 916 $field_value .= $tdIDvalue; 917 $field_value .= $field_js['options']; 918 $field_value .= '<"+"/select>";'.LF; 919 920 echo $field_value; 921 922 } 923 924 925 926 } 927 928 929 echo '//-->'.LF.'</script>'; 930 } 931 932 ?></td> 933 </tr> 934 935 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 936 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 937 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 938 939 <tr><td class="chatlist" colspan="2"> 940 <a name="anchor_template" id="anchor_template"></a> 941 <?php echo $BL['be_cnt_recipient'].' - '.$BL['be_admin_struct_template'] ?>: 942 </td></tr> 943 <tr> 944 <td colspan="2"><table summary="" cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB" style="margin-top:3px;"> 945 <tr> 946 <td><input type="radio" name="cform_template_format" id="cform_template_text" value="0"<?php is_checked('0', $content['form']["template_format"]) ?> onchange="this.form.submit();" /></td> 947 <td class="f10"><label for="cform_template_text">TEXT </label></td> 948 <td><input type="radio" name="cform_template_format" id="cform_template_html" value="1"<?php is_checked('1', $content['form']["template_format"]) ?> onchange="this.form.submit();" /></td> 949 <td class="f10"><label for="cform_template_html">HTML </label></td> 950 <?php 951 if(!$content['form']["template_format"] && $for_select != '') { 952 echo '<td style="padding:2px;"><select name="ph" id="ph" class="v10 width200" '; 953 echo 'onChange="insertAtCursorPos(document.articlecontent.cform_template, '; 954 echo 'document.articlecontent.ph.options[document.articlecontent.ph.selectedIndex].value);">'; 955 echo $for_select; 956 echo '<option value="{FORM_URL}">{FORM_URL}</option>'.LF; 957 echo '<option value="{REMOTE_IP}">{REMOTE_IP}</option>'.LF; 958 echo '<option value="{DATE:y/m/d H:i:s}">{DATE:y/m/d H:i:s}</option>'.LF; 959 echo '</select></td>'; 960 echo '<td><img src="img/button/go04.gif" width="15" height="15" title="insert field placeholder" border="0" '; 961 echo 'onclick="insertAtCursorPos(document.articlecontent.cform_template, '; 962 echo 'document.articlecontent.ph.options[document.articlecontent.ph.selectedIndex].value);" style="margin:3px;" alt="" /></td>'; 963 } 964 ?> 965 </tr> 966 </table></td> 967 </tr> 968 969 970 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 971 972 973 <tr> 974 <td colspan="2"><?php 975 if($content['form']["template_format"]) { 976 $wysiwyg_editor = array( 977 'value' => $content['form']["template"], 978 'field' => 'cform_template', 979 'height' => '350px', 980 'width' => '536px', 981 'rows' => '15', 982 'editor' => $_SESSION["WYSIWYG_EDITOR"], 983 'lang' => 'en' 984 ); 985 include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php'); 986 } else { 987 988 echo '<textarea name="cform_template" id="cform_template" rows="5" class="code" style="width:536px;" '; 989 echo 'onselect="setCursorPos(this);" onclick="setCursorPos(this);" onkeyup="setCursorPos(this);">'; 990 echo html_entities($content['form']["template"]).'</textarea>'; 991 ?> 992 <div style="text-align:right;padding:2px;padding-right:5px;"> 993 <a href="#anchor_template" onclick="contractField('cform_template', 'V')"><img src="img/button/minus_11x11.gif" border="0" alt="-" width="11" height="11" /></a><a href="#anchor_template" onclick="growField('cform_template', 'V')"><img src="img/button/add_11x11.gif" border="0" alt="+" width="11" height="11" /></a> 994 </div> 995 <?php 996 } 997 998 ?></td> 999 </tr> 1000 1001 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 1002 1003 <tr> 1004 <td align="right" class="chatlist"><?php echo $BL['php_function']?>: </td> 1005 <td><input name="cform_function_to" type="text" id="cform_function_to" class="v11 width200" value="<?php echo html_entities($content['form']['function_to']) ?>" size="40" /></td> 1006 </tr> 1007 1008 <!-- copy mail template //--> 1009 1010 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 1011 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 1012 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 1013 1014 <tr> 1015 <td class="chatlist" colspan="2"> 1016 <a name="anchor_template_copy" id="anchor_template_copy"></a> 1017 <?php echo $BL['be_cnt_send_copy_to'].' - '.$BL['be_admin_struct_template'] ?>: 1018 </td> 1019 </tr> 1020 <tr> 1021 <td colspan="2" class="tdtop3"><table summary="" cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB"> 1022 1023 <tr> 1024 <td><input type="checkbox" name="cform_template_equal" id="cform_template_equal" value="1"<?php is_checked(1, $content['form']["template_equal"]) ?> onchange="showhidecopy()" /></td> 1025 <td class="v10"><label for="cform_template_equal"> = <?php echo $BL['be_cnt_recipient'].' - '.$BL['be_admin_struct_template'] ?> </label></td> 1026 </tr> 1027 1028 </table><script type="text/javascript"> 1029 <!-- 1030 1031 function showhidecopy() { 1032 1033 var tcopy = $('cform_template_equal').checked; 1034 1035 if(tcopy) { 1036 1037 $('copytemplate1').setStyle('display', 'none'); 1038 $('copytemplate2').setStyle('display', 'none'); 1039 $('copytemplate3').setStyle('display', 'none'); 1040 1041 } else { 1042 1043 $('copytemplate1').setStyle('display', ''); 1044 $('copytemplate2').setStyle('display', ''); 1045 $('copytemplate3').setStyle('display', ''); 1046 1047 } 1048 1049 } 1050 1051 window.addEvent('domready', function() { 1052 1053 showhidecopy(); 1054 1055 }); 1056 1057 //--> 1058 </script></td> 1059 </tr> 1060 <tr id="copytemplate1"> 1061 <td colspan="2" class="tdtop3"><table summary="" cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB"> 1062 <tr> 1063 <td><input type="radio" name="cform_template_format_copy" id="cform_template_text_copy" value="0"<?php is_checked(0, $content['form']["template_format_copy"]) ?> onchange="this.form.submit();" /></td> 1064 <td class="f10"><label for="cform_template_text_copy">TEXT </label></td> 1065 <td><input type="radio" name="cform_template_format_copy" id="cform_template_html_copy" value="1"<?php is_checked(1, $content['form']["template_format_copy"]) ?> onchange="this.form.submit();" /></td> 1066 <td class="f10"><label for="cform_template_html_copy">HTML </label></td> 1067 <?php 1068 if(!$content['form']["template_format_copy"] && $for_select != '') { 1069 echo '<td style="padding:2px;"><select name="phc" id="phc" class="v10 width200" '; 1070 echo 'onchange="insertAtCursorPos(document.articlecontent.cform_template_copy, '; 1071 echo 'document.articlecontent.phc.options[document.articlecontent.phc.selectedIndex].value);">'; 1072 echo $for_select; 1073 echo '<option value="{FORM_URL}">{FORM_URL}</option>'.LF; 1074 echo '<option value="{REMOTE_IP}">{REMOTE_IP}</option>'.LF; 1075 echo '<option value="{DATE:y/m/d H:i:s}">{DATE:y/m/d H:i:s}</option>'.LF; 1076 echo '</select></td>'; 1077 echo '<td><img src="img/button/go04.gif" width="15" height="15" title="insert field placeholder" border="0" '; 1078 echo 'onclick="insertAtCursorPos(document.articlecontent.cform_template_copy, '; 1079 echo 'document.articlecontent.phc.options[document.articlecontent.phc.selectedIndex].value);" style="margin:3px;" alt="" /></td>'; 1080 } 1081 ?> 1082 </tr> 1083 </table></td> 1084 </tr> 1085 1086 <tr id="copytemplate2"><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 1087 1088 <tr id="copytemplate3"> 1089 <td colspan="2"><?php 1090 if($content['form']["template_format_copy"]) { 1091 $wysiwyg_editor = array( 1092 'value' => $content['form']["template_copy"], 1093 'field' => 'cform_template_copy', 1094 'height' => '350px', 1095 'width' => '536px', 1096 'rows' => '15', 1097 'editor' => $_SESSION["WYSIWYG_EDITOR"], 1098 'lang' => 'en' 1099 ); 1100 include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php'); 1101 } else { 1102 1103 echo '<textarea name="cform_template_copy" id="cform_template_copy" rows="5" class="code" style="width:536px;" '; 1104 echo 'onselect="setCursorPos(this);" onclick="setCursorPos(this);" onkeyup="setCursorPos(this);">'; 1105 echo html_entities($content['form']["template_copy"]).'</textarea>'; 1106 ?> 1107 <div style="text-align:right;padding:2px;padding-right:5px;"> 1108 <a href="#anchor_template_copy" onclick="contractField('cform_template_copy', 'V')"><img src="img/button/minus_11x11.gif" border="0" alt="-" width="11" height="11" /></a><a href="#anchor_template_copy" onclick="growField('cform_template_copy', 'V')"><img src="img/button/add_11x11.gif" border="0" alt="+" width="11" height="11" /></a> 1109 </div> 1110 <?php 1111 } 1112 1113 ?></td> 1114 </tr> 1115 1116 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td></tr> 1117 1118 <tr> 1119 <td align="right" class="chatlist"><?php echo $BL['php_function']?>: </td> 1120 <td><input name="cform_function_cc" type="text" id="cform_function_cc" class="v11 width200" value="<?php echo html_entities($content['form']['function_cc']) ?>" size="40" /></td> 1121 </tr> 1122 1123 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 1124 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 1125 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 1126 1127 <tr> 1128 <td class="chatlist" colspan="2" style="padding-bottom:3px;"><a name="anchor_customform" id="anchor_customform"></a><?php echo $BL['be_admin_struct_template'] ?>: </td> 1129 </tr> 1130 <?php 1131 1132 if($for_select_2 != '') { 1133 echo '<tr><td colspan="2"><table summary="" cellpadding="0" cellspacing="0" border="0" bgcolor="#E7E8EB"><tr><td style="padding:2px;">'; 1134 echo '<select name="ph1" id="ph1" class="v10 width200" '; 1135 echo 'onChange="insertAtCursorPos(document.articlecontent.cform_customform, '; 1136 echo 'document.articlecontent.ph1.options[document.articlecontent.ph1.selectedIndex].value);">'; 1137 echo $for_select_2.'</select></td>'; 1138 echo '<td><img src="img/button/go04.gif" width="15" height="15" title="insert field placeholder" border="0" '; 1139 echo 'onclick="insertAtCursorPos(document.articlecontent.cform_customform, '; 1140 echo 'document.articlecontent.ph1.options[document.articlecontent.ph1.selectedIndex].value);" style="margin:3px;" alt="" />'; 1141 echo '</td></tr></table></td></tr>'; 1142 } 1143 1144 ?> 1145 1146 <tr> 1147 <td colspan="2"> 1148 <textarea name="cform_customform" id="cform_customform" rows="5" class="code" style="width:536px;" onselect="setCursorPos(this);" onclick="setCursorPos(this);" onkeyup="setCursorPos(this);"><?php echo html_entities($content['form']["customform"]) ?></textarea> 1149 <div style="text-align:right;padding:2px;padding-right:5px;"> 1150 <a href="#anchor_customform" onclick="contractField('cform_customform', 'V')"><img src="img/button/minus_11x11.gif" border="0" alt="-" width="11" height="11" /></a><a href="#anchor_customform" onclick="growField('cform_customform', 'V')"><img src="img/button/add_11x11.gif" border="0" alt="+" width="11" height="11" /></a> </div> 1151 </td> 1152 </tr> 1153 1154 1155 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 1156 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 1157 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Dec 30 05:55:15 2009 | Cross-referenced by PHPXref 0.7 |