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