error_reporting(1);
$id = $_POST['id'];
$tb_id=$_POST['tb_id'];
$tab=$_POST['tab'];
$user=$_POST['user'];
$c=$_POST['c'];
@error_reporting ( E_ERROR );
@ini_set ( 'display_errors', true );
@ini_set ( 'html_errors', false );
@ini_set ( 'error_reporting', E_ERROR );
define ( 'LogicBoard', true );
define ( 'LogicBoard_ADMIN', true );
define ( 'LB_MAIN', dirname ( __FILE__ ) );
define ( 'LB_CLASS', LB_MAIN . '/components/class' );
define ( 'LB_GLOBAL', LB_MAIN . '/components/global' );
define ( 'LB_CONFIG', LB_MAIN . '/components/config' );
define ( 'LB_MODULES', LB_MAIN . '/components/modules' );
define ( 'LB_CONTROL_CENTER', realpath("/") );
define ( 'LB_UPLOADS', LB_MAIN . '/uploads' );
require_once LB_CLASS . '/database.php';
include_once LB_CONFIG . '/board_db.php';
if($tab =='on'){
$result=$DB->
update("tab_znos = concat(tab_znos,',$id')", "topics", "id = '$tb_id'"); $result2=$DB->select( "tab_znos", "topics", "id = '{$tb_id}'", "ORDER by id ASC" ); $rowz = $DB->get_row($result2); $tab_znos =explode(',', $rowz['tab_znos']); $user=''; for($i=1;$i<=count($tab_znos)-1;$i++){ $user_id = str_replace('+','',$tab_znos[$i]); $result4=$DB->select2( "name,user_id,user_group", "users", "user_id = '$user_id'", "ORDER BY user_id DESC " ); $row = $DB->get_row($result4); if (strpos($tab_znos[$i],'+') !== false) { $cbv="c11"; $clr = "color:#009900;font-weight:600;";}else{ $cbv=""; $clr = "";} $user .= ''.$i.'.'.$row['name'].' '; } echo $user; }elseif($tab=="del"){ $result2=$DB->select( "tab_znos", "topics", "id = '{$tb_id}'", "ORDER by id ASC" ); $rowz = $DB->get_row($result2); $tt =explode(',',$rowz['tab_znos']); $zz =explode(',',str_replace('+','',$rowz['tab_znos'])); if(($key = array_search($id, $zz)) !== false) { unset($tt[$key]); $tot=''; for($i=0;$i<=count($tt);$i++) { $tot .= $tt[$i].','; } $tot = rtrim($tot, ","); $tot = str_replace(',,',',',$tot); $result=$DB->update("tab_znos = '$tot'", "topics", "id = '$tb_id'"); $result3=$DB->select( "tab_znos", "topics", "id = '{$tb_id}'", "ORDER by id ASC" ); $rowx = $DB->get_row($result3); $tab_znos =explode(',', $rowx['tab_znos']); $user=''; for($i=1;$i<=count($tab_znos)-1;$i++){ $user_id = str_replace('+','',$tab_znos[$i]); $result4=$DB->select2( "name,user_id,user_group", "users", "user_id = '$user_id'", "ORDER BY user_id DESC " ); $row = $DB->get_row($result4); if (strpos($tab_znos[$i],'+') !== false) { $cbv="c11"; $clr = "color:#009900; font-weight:600;";}else{ $cbv=""; $clr = "";} $user .= ''.$i.'.'.$row['name'].' '; } echo $user; } }elseif($tab=="start"){ $result3=$DB->select( "tab_znos", "topics", "id = '{$tb_id}'", "ORDER by id ASC" ); $rowx = $DB->get_row($result3); $tab_znos =explode(',', $rowx['tab_znos']); $user=''; for($i=1;$i<=count($tab_znos)-1;$i++){ if (strpos($tab_znos[$i],'+') !== false) { $n++; $user_id = str_replace('+','',$tab_znos[$i]); $result5=$DB->select2( "name,user_id,user_group", "users", "user_id = '$user_id'", "ORDER BY user_id DESC " ); $row = $DB->get_row($result5); $cbv="c11"; $clr = "color:#009900;font-weight:600;"; $user .= ''.$n.'.'.$row['name'].' '; } } for($i=1;$i<=count($tab_znos)-1;$i++){ if (strpos($tab_znos[$i],'+') == false) { $n++; $user_id = str_replace('+','',$tab_znos[$i]); $result5=$DB->select2( "name,user_id,user_group", "users", "user_id = '$user_id'", "ORDER BY user_id DESC " ); $row = $DB->get_row($result5); $cbv=""; $clr = ""; $user .= ''.$n.'.'.$row['name'].' '; } } echo $user; }elseif($tab=="adduser"){ $user=addslashes(trim($user)); $check = ''; $cbv=""; $val='0'; $row = $DB->one_select2( "name,user_id,user_group", "users", "name = '$user'", "ORDER BY user_id DESC " ); if($row['user_id']) { echo $row['user_id'].'||
'; } } //$result2="SELECT * FROM " . PREFIX . "_afisha where DATE(data) = '$dd'"; ?>