[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2010 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 // ---------------------------------------------------------------- 25 // obligate check for phpwcms constants 26 if (!defined('PHPWCMS_ROOT')) { 27 die("You Cannot Access This Script Directly, Have a Nice Day."); 28 } 29 // ---------------------------------------------------------------- 30 31 32 ?><form action="phpwcms.php?do=profile" method="post" name="formprofiledetail" id="formprofiledetail" autocomplete="off"> 33 <table border="0" cellpadding="0" cellspacing="0" summary=""> 34 <tr><td colspan="2" class="title"><?php echo $BL['be_profile_account_title'] ?></td></tr> 35 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 36 <tr><td colspan="2"><?php echo $BL['be_profile_account_text'] ?></td></tr> 37 <?php 38 //if error during login occurs 39 if(!empty($err)) { 40 echo '<tr valign="top"><td align="right" class="error"><img src="img/leer.gif" width="1" height="10"><br /><strong>'; 41 echo $BL['be_profile_label_err']; 42 echo ':</strong> </td><td class="error"><img src="img/leer.gif" width="1" height="10"><br />'; 43 echo nl2br(chop($err)).'</td></tr>'; 44 } 45 ?> 46 <tr> 47 <td colspan="2"><img src="img/leer.gif" alt="" width="1" height="12"></td> 48 </tr> 49 <tr> 50 <td align="right"><?php echo $BL['be_profile_label_username'] ?>: </td> 51 <td><input name="form_loginname" type="text" id="form_loginname" class="v12b width250" size="30" maxlength="30" value="<?php echo html_specialchars($_SESSION["wcs_user"]); ?>"></td> 52 </tr> 53 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 54 <tr> 55 <td align="right"><?php echo $BL['be_profile_label_newpass'] ?>: </td> 56 <td><input name="form_password" type="password" id="form_password" class="v12b width250" size="30" maxlength="20"></td> 57 </tr> 58 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 59 <tr> 60 <td align="right"><?php echo $BL['be_profile_label_repeatpass'] ?>: </td> 61 <td><input name="form_password2" type="password" id="form_password2" class="v12b width250" size="30" maxlength="20"></td> 62 </tr> 63 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 64 <tr> 65 <td align="right"><?php echo $BL['be_profile_label_email'] ?>: </td> 66 <td><input name="form_useremail" type="text" id="form_useremail" class="v12b width250" value="<?php echo html_specialchars($_SESSION["wcs_user_email"]); ?>" size="30" maxlength="150"></td> 67 </tr> 68 69 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr> 70 71 <tr> 72 <td align="right"><?php echo $BL['be_profile_label_lang'] ?>: </td> 73 <td><select name="form_lang" id="form_lang" class="v12 width250"> 74 <?php 75 // check available languages installed and build language selector menu 76 include_once PHPWCMS_ROOT."/include/inc_lang/code.lang.inc.php"; 77 $lang_dirs = opendir(PHPWCMS_ROOT."/include/inc_lang/backend"); 78 while($lang_codes = readdir( $lang_dirs )) { 79 if( $lang_codes != "." && $lang_codes != ".." && file_exists(PHPWCMS_ROOT."/include/inc_lang/backend/".$lang_codes."/lang.inc.php")) { 80 echo '<option value="'.$lang_codes.'"'; 81 echo ($lang_codes == $_SESSION["wcs_user_lang"]) ? " selected" : ""; 82 echo '>'; 83 echo (isset($BL[strtoupper($lang_codes)])) ? $BL[strtoupper($lang_codes)] : strtoupper($lang_codes); 84 echo "</option>\n"; 85 } 86 } 87 closedir( $lang_dirs ); 88 89 90 $wysiwygTemplates['editor'] = empty($_SESSION["WYSIWYG_EDITOR"]) ? 0 : 1; 91 92 ?> 93 </select></td> 94 </tr> 95 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr> 96 <tr> 97 <td align="right" valign="top" style="padding-top: 3px;"><?php echo $BL['be_WYSIWYG'] ?>: </td> 98 <td><select name="form_wysiwyg" id="form_wysiwyg" class="v12 width250" style="margin-bottom:2px;" onchange="setWYSIWYGtemplate();"> 99 <option value="0"<?php is_selected(0, $_SESSION["WYSIWYG_EDITOR"]) ?>><?php echo $BL['be_WYSIWYG_disabled'] ?></option> 100 <option value="1"<?php is_selected(1, $_SESSION["WYSIWYG_EDITOR"]) ?>>CKEditor 3.4.1</option> 101 <option value="2"<?php is_selected(2, $_SESSION["WYSIWYG_EDITOR"]) ?>>FCKeditor 2.6.6</option> 102 </select> 103 <div id="wysiwyg_template"><input type="hidden" name="form_wysiwyg_toolbar" value="" /></div> 104 </td> 105 </tr> 106 107 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="25"><input name="form_aktion" type="hidden" id="form_aktion" value="update_account"></td> 108 </tr> 109 <tr> 110 <td align="right"> </td> 111 <td><input type="submit" name="Submit" value="<?php echo $BL['be_profile_account_button'] ?>" class="button12"></td> 112 </tr> 113 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="20"></td></tr> 114 </table></form> 115 <?php 116 117 // set templates for WYSIWYG editor 118 if(!empty($phpwcms['wysiwyg_template']['FCKeditor'])) { 119 $wysiwygTemplates['FCKeditor'] = convertStringToArray($phpwcms['wysiwyg_template']['FCKeditor']); 120 } 121 if(empty($wysiwygTemplates['FCKeditor']) || count($wysiwygTemplates['FCKeditor']) == 0) { 122 $wysiwygTemplates['FCKeditor'] = array('phpwcms_basic','phpwcms_default','Default','Basic'); 123 } 124 if(!empty($phpwcms['wysiwyg_template']['CKEditor'])) { 125 $wysiwygTemplates['CKEditor'] = convertStringToArray($phpwcms['wysiwyg_template']['CKEditor']); 126 } 127 if(empty($wysiwygTemplates['CKEditor']) || count($wysiwygTemplates['CKEditor']) == 0) { 128 $wysiwygTemplates['CKEditor'] = array('phpwcms','Default','Basic'); 129 } 130 131 $wysiwygTemplates['userTemplate'] = empty($_SESSION["WYSIWYG_TEMPLATE"]) ? '' : $_SESSION["WYSIWYG_TEMPLATE"]; 132 133 // FCKeditor 134 $wysiwygTemplates['FCKeditor_options'] = ''; 135 foreach($wysiwygTemplates['FCKeditor'] as $value) { 136 $value = html_specialchars($value); 137 $wysiwygTemplates['FCKeditor_options'] .= ' <option value="'.$value.'"'; 138 if($wysiwygTemplates['userTemplate'] == $value) { 139 $wysiwygTemplates['FCKeditor_options'] .= ' selected="selected"'; 140 } 141 $wysiwygTemplates['FCKeditor_options'] .= '>FCKeditor: '.$value.'<\'+\'/option>'; 142 } 143 144 $wysiwygTemplates['FCKeditor_select'] = '<select name="form_wysiwyg_template" class="v12 width250">'; 145 $wysiwygTemplates['FCKeditor_select'] .= $wysiwygTemplates['FCKeditor_options']; 146 $wysiwygTemplates['FCKeditor_select'] .= '<\'+\'/select>'; 147 148 // CKEditor 149 $wysiwygTemplates['CKEditor_options'] = ''; 150 foreach($wysiwygTemplates['CKEditor'] as $value) { 151 $value = html_specialchars($value); 152 $wysiwygTemplates['CKEditor_options'] .= ' <option value="'.$value.'"'; 153 if($wysiwygTemplates['userTemplate'] == $value) { 154 $wysiwygTemplates['CKEditor_options'] .= ' selected="selected"'; 155 } 156 $wysiwygTemplates['CKEditor_options'] .= '>CKEditor: '.$value.'<\'+\'/option>'; 157 } 158 159 $wysiwygTemplates['CKEditor_select'] = '<select name="form_wysiwyg_template" class="v12 width250">'; 160 $wysiwygTemplates['CKEditor_select'] .= $wysiwygTemplates['CKEditor_options']; 161 $wysiwygTemplates['CKEditor_select'] .= '<\'+\'/select>'; 162 163 ?> 164 <script language="javascript" type="text/javascript"> 165 <!-- 166 setWYSIWYGtemplate(); 167 168 function setWYSIWYGtemplate() { 169 var templateObj = document.getElementById('form_wysiwyg'); 170 var templateVal = templateObj.options[templateObj.selectedIndex].value; 171 switch(templateVal) { 172 case 2: 173 case '2': 174 var baseVal = '<?php echo $wysiwygTemplates['FCKeditor_select'] ?>'; 175 break; 176 case 1: 177 case '1': 178 var baseVal = '<?php echo $wysiwygTemplates['CKEditor_select'] ?>'; 179 break; 180 default: 181 var baseVal = '<input type="hidden" name="form_wysiwyg_toolbar" value="" />'; 182 } 183 document.getElementById('wysiwyg_template').innerHTML = baseVal; 184 } 185 //--> 186 </script>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |