43 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| ob_start();
 | |
| ob_implicit_flush(0);
 | |
| define('BASE_DIR', str_replace("\\", "/", dirname(dirname(dirname(__FILE__)))));
 | |
| require_once(BASE_DIR . '/inc/init.php');
 | |
| require_once(BASE_DIR . '/modules/unicalendar/lang/ru.php');
 | |
| if (! check_permission('adminpanel'))
 | |
| {
 | |
| 	header('Location:/index.php');
 | |
| 	exit;
 | |
| }
 | |
| if (isset($_POST['c']))
 | |
| {
 | |
|     global $AVE_DB;
 | |
|     $sql = $AVE_DB->Query("
 | |
|     SELECT Id, rubric_title 
 | |
|     FROM " . PREFIX . "_rubrics
 | |
|     ");
 | |
|     echo "<option style='color: #ABABAB;'  value='' >".$select_category."</option>";
 | |
|     while($result = $sql->FetchRow()){
 | |
|     echo "<option value=".$result->Id.">".$result->rubric_title."</option>";
 | |
|     };  
 | |
| }
 | |
| 
 | |
| if (isset($_POST['a']))
 | |
| {
 | |
|    global $AVE_DB;  
 | |
|    $sql = $AVE_DB->Query("
 | |
|    SELECT Id, document_alias, document_title, document_published, document_meta_description 
 | |
|    FROM " . PREFIX . "_documents
 | |
|    WHERE rubric_id = '" . $_POST['b'] . "' AND Id !=1 && Id != '".PAGE_NOT_FOUND_ID."'
 | |
|    ");
 | |
| 	$u_sel_doc = array();
 | |
| 	while ($row = $sql->FetchAssocArray())
 | |
| 	{
 | |
| 	array_push($u_sel_doc, $row);
 | |
| 	}
 | |
|     foreach ( $u_sel_doc as $k=>$v )
 | |
|     {
 | |
|     echo "<tr class='noborder'><td align='center'><input type='checkbox' class='my-checkbox' name='u_chek".$v['Id']."' value='".$v['Id']."'></td>"."<td align='center'>".$v['Id']."</td>"."<td>".$v['document_title']."</td>"."<td align='center'>".$v['document_published'] = pretty_date(strftime(TIME_FORMAT, $v['document_published']))."</td></tr>";
 | |
|     }
 | |
| }
 | |
| ?>
 |