function setAdminPermissions($uid, $permissions)
 {
     global $application;
     $tables = Users::getTables();
     $table = 'admin_permissions';
     $columns =& $tables[$table]['columns'];
     $query = new DB_Multiple_Replace($table);
     foreach ($permissions as $p => $a) {
         $query->addReplaceValuesArray(array($uid, $p, $a));
     }
     $application->db->getDB_Result($query);
 }
Beispiel #2
0
 function PRODUCT_INFO_REPLACE_MULTIPLE_RECORDS()
 {
     parent::DB_Multiple_Replace('reports_product_info');
 }
Beispiel #3
0
 function MULTIPLE_REPLACE_ML_RECORDS()
 {
     parent::DB_Multiple_Replace('multilang_data');
 }
 function __updatePersonInfoAttrInDB($attrs)
 {
     global $application;
     $tables = Customer_Account::getTables();
     $data_table = $tables['ca_person_info_data']['columns'];
     $ca_attrs_list = $this->__getCAAttrsList();
     loadCoreFile('db_multiple_replace.php');
     $tables = Customer_Account::getTables();
     $query = new DB_Multiple_Replace('ca_person_info_data');
     $query->setReplaceFields(array('customer_id', 'ag_id', 'data_value'));
     foreach ($attrs as $attr_info) {
         list($group_id, $attr_id, $attr_value) = $attr_info;
         $r_arr = array('customer_id' => $this->base_info['ID'], 'ag_id' => $ca_attrs_list[$group_id][$attr_id]['ag_id'], 'data_value' => $attr_value);
         $query->addReplaceValuesArray($r_arr);
     }
     $application->db->PrepareSQL($query);
     return $application->db->DB_Exec();
 }