1234567891011121314151617181920212223 |
- <?
- $y = date("Y")*1;
- $d = cal_days_in_month(CAL_GREGORIAN, $m, $y);
- $m = $m<10?"0$m":$m;
- $d = $d<10?"0$d":$d;
- $b_date = date("Y-".$m."-01 00:00:00");
- $e_date = date("Y-".$m."-".$d." 23:59:59");
- $authord = [];
- if( $author ){
- $authornews = [];
- $sql = "select * from `news` WHERE `dt_pub` BETWEEN '".$b_date."' AND '".$e_date."' and `news`.active = 'Y' and editors like '$author%' order by dt_pub";
- $authord = Yii::$app->db->createCommand( $sql )->queryAll();
- }
- ?>"Дата";"Заголовок";"URL"
- <?
- foreach( $authord as $author ){
- ?>
- "<?=date("d-m-Y h:i", strtotime($author['dt_pub']))?>";"<?=str_replace( '"', "'", ($author['title']))?> "; "https://www.amic.ru/news/<?=$author['id']?>"
- <?
- }
- ?>
|