Changeset 4080 for extensions
- Timestamp:
- Oct 21, 2009, 6:38:46 PM (15 years ago)
- Location:
- extensions/adult_content
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/adult_content/class.inc.php
r4078 r4080 76 76 function set_block_on_index () 77 77 { 78 global $page, $template; 78 $this->loading_lang(); 79 global $page, $template, $user, $conf; 79 80 80 81 if (isset($page['section']) and $page['section'] == 'categories') 82 81 83 { 84 ////////////lié à quoi///// 85 $query = ' 86 SELECT id FROM '.GROUPS_TABLE.' 87 WHERE name IN (\'+18\') 88 ;'; 89 $data_18 = mysql_fetch_array(pwg_query($query)); 90 $query = ' 91 SELECT id FROM '.GROUPS_TABLE.' 92 WHERE name IN (\'16-17\') 93 ;'; 94 $data_16 = mysql_fetch_array(pwg_query($query)); 95 $query = ' 96 SELECT id FROM '.GROUPS_TABLE.' 97 WHERE name IN (\'nothing\') 98 ;'; 99 $data_no = mysql_fetch_array(pwg_query($query)); 100 $n_query = ' 101 SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.' 102 WHERE group_id IN (\''.$data_18['id'].'\',\''.$data_16['id'].'\',\''.$data_no['id'].'\') AND user_id IN (\''.$user['id'].'\') 103 ;'; 104 $data_user = mysql_fetch_array(pwg_query($n_query)); 105 $is_grouped = $data_user['result']; 106 107 if ( $is_grouped == 0 and $user['username'] !== '16' and $user['username'] !== '18') 108 { 82 109 $template->set_filename('ac_block', realpath($this->get_template('block.tpl') ) ); 83 110 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE'; 84 111 $end = 'PLUGIN_INDEX_CONTENT_AFTER'; 85 112 $template->concat($begin, $template->parse('ac_block', true)); 113 } 86 114 } 87 115 }
Note: See TracChangeset
for help on using the changeset viewer.