Changeset 21047 for extensions/adult_content/class.inc.php
- Timestamp:
- Feb 26, 2013, 8:50:03 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/adult_content/class.inc.php
r12082 r21047 19 19 $query = 'SELECT group_id FROM ' . USER_GROUP_TABLE . ' WHERE user_id = ' . $user['id'] . ';'; 20 20 $result = pwg_query($query); 21 while ($row = mysql_fetch_assoc($result))21 while ($row = pwg_db_fetch_assoc($result)) 22 22 { 23 23 array_push($this->idgroups_user, $row['group_id']); … … 30 30 $query = 'SELECT id FROM ' . GROUPS_TABLE . ' WHERE name IN (\'+18\', \'16-17\', \'nothing\') ORDER BY id'; 31 31 $result = pwg_query($query); 32 while ($row = mysql_fetch_assoc($result))32 while ($row = pwg_db_fetch_assoc($result)) 33 33 { 34 34 array_push($this->idgroups_ad_c, $row['id']); … … 131 131 WHERE name IN (\'+18\') 132 132 ;'; 133 $data_18 = mysql_fetch_array(pwg_query($query));133 $data_18 = pwg_db_fetch_array(pwg_query($query)); 134 134 $query = ' 135 135 SELECT id FROM '.GROUPS_TABLE.' 136 136 WHERE name IN (\'16-17\') 137 137 ;'; 138 $data_16 = mysql_fetch_array(pwg_query($query));138 $data_16 = pwg_db_fetch_array(pwg_query($query)); 139 139 $query = ' 140 140 SELECT id FROM '.GROUPS_TABLE.' 141 141 WHERE name IN (\'nothing\') 142 142 ;'; 143 $data_no = mysql_fetch_array(pwg_query($query));143 $data_no = pwg_db_fetch_array(pwg_query($query)); 144 144 $n_query = ' 145 145 SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.' 146 146 WHERE group_id IN (\''.$data_18['id'].'\',\''.$data_16['id'].'\',\''.$data_no['id'].'\') AND user_id IN (\''.$user['id'].'\') 147 147 ;'; 148 $data_user = mysql_fetch_array(pwg_query($n_query));148 $data_user = pwg_db_fetch_array(pwg_query($n_query)); 149 149 $is_grouped = $data_user['result']; 150 150 … … 164 164 global $user, $conf, $page, $template; 165 165 $menu = & $menu_ref_arr[0]; 166 $conf_plugin = explode("," ,$conf['ad_c_plugin']);166 $conf_plugin = unserialize($conf['ad_c_plugin']); 167 167 $template->assign( 168 168 array( … … 172 172 173 173 //include($this->var_template()); 174 if (is_a_guest() and $conf_plugin[ 0]=='true')174 if (is_a_guest() and $conf_plugin['menublock_for_guest']=='true') 175 175 { 176 176 … … 217 217 ///////////////////////[FIN fermer/ouvert]//////////////////// 218 218 }//fin if guest 219 elseif (is_a_guest() and $conf_plugin[ 0]!='true')219 elseif (is_a_guest() and $conf_plugin['menublock_for_guest']!='true') 220 220 { 221 221 $menu->hide_block('mbAdultContent'); … … 317 317 redirect(PHPWG_ROOT_PATH.'plugins/adult_content/charte_user.php'); 318 318 } 319 } 319 } 320 function ac_stuffs_module($modules) 321 { 322 load_language('plugin.lang', $this->plugin_path); 323 array_push($modules, array( 324 'path' => PHPWG_PLUGINS_PATH . AC_NAME . '/stuffs_module/', 325 'name' => l10n('ac_text'), 326 'description' => l10n('ac_stuffs_description'), 327 ) 328 ); 329 return $modules; 330 } 331 320 332 }//fin class 321 333 ?>
Note: See TracChangeset
for help on using the changeset viewer.