[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/ -> profile.data.tmpl.php (source)

   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  //Auslesen der eventuell für den User bereits vorhandenen Detaildaten
  32  //1. Prüfen, ob überhaupt ein Profil angelegt ist
  33  $sql = 'SELECT COUNT(*) FROM '.DB_PREPEND.'phpwcms_userdetail WHERE detail_pid='.intval($_SESSION["wcs_user_id"]);
  34  
  35  if(_dbQuery($sql, 'COUNT')) {
  36          
  37      //Es sind bereits Daten hinterlegt - diese jetzt auslesen
  38      $sql = 'SELECT * FROM '.DB_PREPEND.'phpwcms_userdetail WHERE detail_pid='.intval($_SESSION['wcs_user_id']).' LIMIT 1';
  39      $detail = _dbQuery($sql);
  40      if(is_array($detail[0])) {
  41          $detail = $detail[0];
  42          $form_detail_aktion = 'update_detail';
  43      } else {
  44          $form_detail_aktion = 'create_detail';
  45      }
  46              
  47  } else {
  48              
  49      $form_detail_aktion = 'create_detail';
  50          
  51  }
  52  
  53  if($form_detail_aktion == 'create_detail') {
  54      
  55      $detail = array(
  56      
  57          'detail_title'        => '',
  58          'detail_firstname'    => '',
  59          'detail_lastname'    => '',
  60          'detail_company'    => '',
  61          'detail_street'        => '',
  62          'detail_add'        => '',
  63          'detail_city'        => '',
  64          'detail_region'        => '',
  65          'detail_zip'        => '',
  66          'detail_country'    => '',
  67          'detail_fon'        => '',
  68          'detail_fax'        => '',
  69          'detail_mobile'        => '',
  70          'detail_signature'    => '',
  71          'detail_notes'        => '',
  72          'detail_prof'        => '',
  73          'detail_newsletter'    => 1,
  74          'detail_public'        => 1
  75      
  76      );
  77  
  78  }
  79  
  80  ?><form action="phpwcms.php?do=profile&amp;p=1" method="post" name="formprofiledetail" id="formprofiledetail"><table width="538" border="0" cellpadding="0" cellspacing="0" summary="">
  81      <tr><td colspan="3" class="title"><?php echo $BL['be_profile_data_title'] ?></td></tr>
  82      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr>
  83      <tr><td colspan="3"><?php echo $BL['be_profile_data_text'] ?></td></tr>
  84  <?php
  85      //if error during login occurs
  86      if(!empty($detail_updated)) {
  87          echo '<tr><td colspan="3" class="error"><img src="img/leer.gif" alt=" width="1" height="10" /><br /><strong>';
  88          echo nl2br(chop($detail_updated)).'</strong></td></tr>';
  89      }
  90  ?>
  91      <tr> 
  92          <td width="110" height="12"><img src="img/leer.gif" alt="" width="110" height="10"></td>
  93          <td><img src="img/leer.gif" alt="" width="25" height="1"></td>
  94          <td><img src="img/leer.gif" alt="" width="403" height="1"></td>
  95      </tr>
  96      <tr> 
  97          <td align="right"><?php echo $BL['be_profile_label_title'] ?>:&nbsp;</td>
  98          <td colspan="2"><input name="form_title" type="text" id="form_title" class="v12 width250" value="<?php echo html_specialchars($detail["detail_title"]) ?>" size="30" maxlength="50"></td>
  99      </tr>
 100      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 101      <tr> 
 102          <td align="right"><?php echo $BL['be_profile_label_firstname'] ?>:&nbsp;</td>
 103          <td colspan="2"><input name="form_firstname" type="text" id="form_firstname" class="v12 width250" value="<?php echo html_specialchars($detail["detail_firstname"]) ?>" size="30" maxlength="100"></td>
 104      </tr>
 105      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 106      <tr> 
 107          <td align="right"><?php echo $BL['be_profile_label_name'] ?>:&nbsp;</td>
 108          <td colspan="2"><input name="form_lastname" type="text" id="form_lastname" class="v12 width250" value="<?php echo html_specialchars($detail["detail_lastname"]) ?>" size="30" maxlength="100"></td>
 109      </tr>
 110      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 111      <tr> 
 112          <td align="right"><?php echo $BL['be_profile_label_company'] ?>:&nbsp;</td>
 113          <td colspan="2"><input name="form_company" type="text" id="form_company" class="v12 width250" value="<?php echo html_specialchars($detail["detail_company"]) ?>" size="30" maxlength="100"></td>
 114      </tr>
 115      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 116      <tr> 
 117          <td align="right"><?php echo $BL['be_profile_label_street'] ?>:&nbsp;</td>
 118          <td colspan="2"><input name="form_street" type="text" id="form_street" class="v12 width250" value="<?php echo html_specialchars($detail["detail_street"]) ?>" size="30" maxlength="100"></td>
 119      </tr>
 120      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 121      <tr> 
 122          <td align="right">&nbsp;</td>
 123          <td colspan="2"><input name="form_add" type="text" id="form_add" class="v12 width250" value="<?php echo html_specialchars($detail["detail_add"]) ?>" size="30" maxlength="100"></td>
 124      </tr>
 125      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 126      <tr> 
 127          <td align="right"><?php echo $BL['be_profile_label_city'] ?>:&nbsp;</td>
 128          <td colspan="2"><input name="form_city" type="text" id="form_city" class="v12 width250" value="<?php echo html_specialchars($detail["detail_city"]) ?>" size="30" maxlength="100"></td>
 129      </tr>
 130      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 131      <tr> 
 132          <td align="right"><?php echo $BL['be_profile_label_state'] ?>:&nbsp;</td>
 133          <td colspan="2"><input name="form_region" type="text" id="form_region" class="v12 width250" value="<?php echo html_specialchars($detail["detail_region"]) ?>" size="30" maxlength="100"></td>
 134      </tr>
 135      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 136      <tr> 
 137          <td align="right"><?php echo $BL['be_profile_label_zip'] ?>:&nbsp;</td>
 138          <td colspan="2"><input name="form_zip" type="text" id="form_zip" class="v12 width100" value="<?php echo html_specialchars($detail["detail_zip"]) ?>" size="30" maxlength="50"></td>
 139      </tr>
 140      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 141      <tr> 
 142          <td align="right"><?php echo $BL['be_profile_label_country'] ?>:&nbsp;</td>
 143          <td colspan="2"><select name="form_country" id="form_country" class="v12 width250">
 144          <?php echo list_country($detail["detail_country"]); ?>
 145          </select></td>
 146      </tr>
 147      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr>
 148      <tr> 
 149          <td align="right"><?php echo $BL['be_profile_label_phone'] ?>:&nbsp;</td>
 150          <td colspan="2"><input name="form_fon" type="text" id="form_fon" class="v12 width250" value="<?php echo html_specialchars($detail["detail_fon"]) ?>" size="30" maxlength="30"></td>
 151      </tr>
 152      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 153      <tr> 
 154          <td align="right"><?php echo $BL['be_profile_label_fax'] ?>:&nbsp;</td>
 155          <td colspan="2"><input name="form_fax" type="text" id="form_fax" class="v12 width250" value="<?php echo html_specialchars($detail["detail_fax"]) ?>" size="30" maxlength="30"></td>
 156      </tr>
 157      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 158      <tr> 
 159          <td align="right"><?php echo $BL['be_profile_label_cellphone'] ?>:&nbsp;</td>
 160          <td colspan="2"><input name="form_mobile" type="text" id="form_mobile" class="v12 width250" value="<?php echo html_specialchars($detail["detail_mobile"]) ?>" size="30" maxlength="30"></td>
 161      </tr>
 162      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr>
 163      <tr> 
 164          <td align="right" valign="top"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_profile_label_signature'] ?>:&nbsp;</td>
 165          <td colspan="2"><textarea name="form_signature" cols="30" rows="3" id="form_signature" class="v12 width400"><?php echo html_specialchars($detail["detail_signature"]) ?></textarea></td>
 166      </tr>
 167      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 168      <tr> 
 169          <td align="right" valign="top"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_profile_label_notes'] ?>:&nbsp;</td>
 170          <td colspan="2"><textarea name="form_notes" cols="30" rows="6" id="form_notes" class="v12 width400"><?php echo html_specialchars($detail["detail_notes"]) ?></textarea></td>
 171      </tr>
 172      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr>
 173      <tr> 
 174          <td align="right"><?php echo $BL['be_profile_label_profession'] ?>:&nbsp;</td>
 175          <td colspan="2"><select name="form_prof" id="select2" class="v12 width250">
 176          <?php list_profession($detail["detail_prof"]); ?>
 177          </select></td>
 178      </tr>
 179      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr>
 180      <tr> 
 181          <td align="right"><?php echo $BL['be_profile_label_newsletter'] ?>:&nbsp;</td>
 182          <td><input name="form_newsletter" type="checkbox" id="form_newsletter" value="1"<?php is_checked($detail["detail_newsletter"], "1"); ?>></td>
 183          <td><?php echo $BL['be_profile_text_newsletter'] ?></td>
 184      </tr>
 185      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr>
 186      <tr> 
 187          <td align="right"><?php echo $BL['be_profile_label_public'] ?>:&nbsp;</td>
 188          <td width="25"><input name="form_public" type="checkbox" id="form_public" value="1"<?php is_checked($detail["detail_public"], "1"); ?>></td>
 189          <td width="403"><?php echo $BL['be_profile_text_public'] ?></td>
 190      </tr>
 191      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="15"><input name="form_aktion" type="hidden" id="form_aktion" value="<?php echo $form_detail_aktion ?>"></td></tr>
 192      <tr> 
 193          <td align="right">&nbsp;</td>
 194          <td colspan="2"><input type="submit" name="Submit" value="<?php echo $BL['be_profile_label_button'] ?>" class="button10"></td>
 195      </tr>
 196      <tr><td colspan="3"><img src="img/leer.gif" alt="" width="1" height="20"></td></tr>
 197  </table></form>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7