コード例 #1
0
 public function bindHashToObject($hash, &$obj, $prefix = null, $notUsed = true, $bindAll = false)
 {
     foreach (get_object_vars($obj) as $k => $notUsed2) {
         if (isset($hash[$k])) {
             if (is_array(w2PHTMLDecode($hash[$k]))) {
                 $obj->{$k} = w2PHTMLDecode($hash[$k]);
             } else {
                 $obj->{$k} = w2PHTMLDecode($hash[$k]);
             }
         }
     }
 }
コード例 #2
0
 public function bindHashToObject($hash, &$obj, $prefix = null, $checkSlashes = true, $bindAll = false)
 {
     foreach (get_object_vars($obj) as $k => $v) {
         if (isset($hash[$k])) {
             if (is_array(w2PHTMLDecode($hash[$k]))) {
                 $obj->{$k} = w2PHTMLDecode($hash[$k]);
             } else {
                 $obj->{$k} = $checkSlashes && get_magic_quotes_gpc() ? stripslashes(w2PHTMLDecode($hash[$k])) : w2PHTMLDecode($hash[$k]);
             }
         }
     }
 }
コード例 #3
0
ファイル: query.class.php プロジェクト: joly/web2project
 /** Bind a hash to an object
  *
  * Takes the hash/associative array specified by $hash and turns the fields into instance properties of $obj
  * @param $hash The hash to bind
  * @param &$obj A reference to the object to bind the hash to
  * @param $prefix Defaults to null, prefix to use with hash keys
  * @param $checkSlashes Defaults to true, strip any slashes from the hash values
  * @param $bindAll Bind all values regardless of their existance as defined instance variables
  */
 public function bindHashToObject($hash, &$obj, $prefix = null, $checkSlashes = true, $bindAll = false)
 {
     is_array($hash) or die('bindHashToObject : hash expected');
     is_object($obj) or die('bindHashToObject : object expected');
     if ($bindAll) {
         foreach ($hash as $k => $v) {
             $obj->{$k} = $checkSlashes && get_magic_quotes_gpc() ? stripslashes(w2PHTMLDecode($hash[$k])) : w2PHTMLDecode($hash[$k]);
         }
     } else {
         if ($prefix) {
             foreach (get_object_vars($obj) as $k => $v) {
                 if (isset($hash[$prefix . $k])) {
                     $obj->{$k} = $checkSlashes && get_magic_quotes_gpc() ? stripslashes(w2PHTMLDecode($hash[$k])) : w2PHTMLDecode($hash[$k]);
                 }
             }
         } else {
             foreach (get_object_vars($obj) as $k => $v) {
                 if (isset($hash[$k])) {
                     $obj->{$k} = $checkSlashes && get_magic_quotes_gpc() ? stripslashes(w2PHTMLDecode($hash[$k])) : w2PHTMLDecode($hash[$k]);
                 }
             }
         }
     }
 }
コード例 #4
0
 if (is_array($permission['axo_groups'])) {
     foreach ($permission['axo_groups'] as $group_id) {
         $group_data = $perms->get_group_data($group_id, 'axo');
         $modlist[] = $AppUI->_($group_data[3]);
     }
 }
 if (is_array($permission['axo'])) {
     foreach ($permission['axo'] as $key => $section) {
         foreach ($section as $id) {
             $mod_data = $perms->get_object_full($id, $key, 1, 'axo');
             if (is_numeric($mod_data['name'])) {
                 $module = $pgo_list[ucfirst($key)];
                 $data = __extract_from_role_perms($module, $mod_data);
                 $modlist[] = $AppUI->_(ucfirst($key)) . ': ' . w2PHTMLDecode($data);
             } else {
                 $modlist[] = $AppUI->_(ucfirst($key)) . ': ' . w2PHTMLDecode($mod_data['name']);
             }
         }
     }
 }
 $buf .= implode('<br />', $modlist);
 $buf .= '</td>';
 // Item information TODO:  need to figure this one out.
 // 	$buf .= '<td></td>';
 // Type information.
 $buf .= '<td>';
 $perm_type = array();
 if (is_array($permission['aco'])) {
     foreach ($permission['aco'] as $key => $section) {
         foreach ($section as $value) {
             $perm = $perms->get_object_full($value, $key, 1, 'aco');
コード例 #5
0
ファイル: Mail.class.php プロジェクト: eureka2/web2project
 /**
  *        set the body (message) of the mail
  *        define the charset if the message contains extended characters (accents)
  *        default to us-ascii
  *        $mail->Body( "m?l en fran?ais avec des accents", "iso-8859-1" );
  */
 public function Body($body, $charset = '')
 {
     $this->Body = w2PHTMLDecode($body);
     if (!empty($charset)) {
         @($this->charset = strtolower($charset));
         if ($this->charset != 'us-ascii') {
             $this->Encoding = '8bit';
         }
     }
 }
コード例 #6
0
 /** Bind a hash to an object
  *
  * Takes the hash/associative array specified by $hash and turns the fields into instance properties of $obj
  * @param $hash The hash to bind
  * @param &$obj A reference to the object to bind the hash to
  * @param $prefix Defaults to null, prefix to use with hash keys
  * @param $notUsed Defaults to true but isn't used anyway
  * @param $bindAll Bind all values regardless of their existance as defined instance variables
  */
 public function bindHashToObject($hash, &$obj, $prefix = null, $notUsed = true, $bindAll = false)
 {
     is_array($hash) or die('bindHashToObject : hash expected');
     is_object($obj) or die('bindHashToObject : object expected');
     if ($bindAll) {
         foreach ($hash as $k => $notUsed2) {
             $obj->{$k} = w2PHTMLDecode($hash[$k]);
         }
     } else {
         if ($prefix) {
             foreach (get_object_vars($obj) as $k => $notUsed2) {
                 if (isset($hash[$prefix . $k])) {
                     $obj->{$k} = w2PHTMLDecode($hash[$k]);
                 }
             }
         } else {
             foreach (get_object_vars($obj) as $k => $notUsed2) {
                 if (isset($hash[$k])) {
                     $obj->{$k} = w2PHTMLDecode($hash[$k]);
                 }
             }
         }
     }
 }