Пример #1
0
 public function actionResetDb()
 {
     die;
     LikeFbPost::model()->deleteAll();
     LikeFbFiles::model()->deleteAll();
     LikeFbDoc::model()->deleteAll();
     LikeFbCommentDoc::model()->deleteAll();
     LikeFbCommentFile::model()->deleteAll();
     LikeFbCommentPost::model()->deleteAll();
     PhotoFbCommentPost::model()->deleteAll();
     PhotoFbPost::model()->deleteAll();
     FbDocComment::model()->deleteAll();
     FbFilesComment::model()->deleteAll();
     FbPostComment::model()->deleteAll();
     FbPost::model()->deleteAll();
     FbFiles::model()->deleteAll();
     FbDoc::model()->deleteAll();
     MemberDegreeGroup::model()->deleteAll();
     MemberExamGroup::model()->deleteAll();
 }
Пример #2
0
 $posts_exam = FbPost::model()->findAllByAttributes(array('exam_group_id' => $ref_id));
 $exam_member = MemberExamGroup::model()->findAllByAttributes(array('user_group_id' => $ref_id));
 // 			array_push($total_post_exam, $posts_exam);
 $docs_exam = FbDoc::model()->findAllByAttributes(array('exam_group_id' => $ref_id));
 $files_exam = FbFiles::model()->findAllByAttributes(array('exam_group_id' => $ref_id));
 foreach ($posts_exam as $pe) {
     $posts_exam_like = LikeFbPost::model()->findAllByAttributes(array('ref_entity_id' => $pe->fbpid));
     // 				array_push($total_posts_exam_like, $posts_exam_like);
     $n_total_post_exam_like += count($posts_exam_like);
     $photos_exam_post = PhotoFbPost::model()->findAllByAttributes(array('element_id' => $pe->fbpid));
     // 				array_push($total_photo_post_exam, $photos_exam_post);
     $n_total_photo_post_exam += count($photos_exam_post);
     $comments = FbPostComment::model()->findAllByAttributes(array('ref_entity_id' => $pe->fbpid));
     foreach ($comments as $c) {
         array_push($total_exam_post_comment, $c);
         $photo_exam_comments = PhotoFbCommentPost::model()->findAllByAttributes(array('element_id' => $c->cid));
         $n_total_photo_exam_comments += count($photo_exam_comments);
         // 					array_push($total_photo_exam_comments, $photo_exam_comments);
         $comment_exam_like = LikeFbCommentPost::model()->findAllByAttributes(array('ref_entity_id' => $c->cid));
         $n_total_like_comments += $c->like_count;
         // 					array_push($total_like_exam_comments, $comment_exam_like);
     }
 }
 $n_total_post_exam = count($posts_exam);
 // 		$n_total_post_exam_like = count($total_posts_exam_like);
 // 		$n_total_photo_post_exam = count($total_photo_post_exam);
 $n_total_exam_post_comment = count($total_exam_post_comment);
 // 		$n_total_photo_exam_comments = count($total_photo_exam_comments);
 // 		$n_total_like_comments = count($total_like_exam_comments);
 $n_member = count($exam_member);
 $n_total_exam_files = count($files_exam);