function deleteQBByCourseId($courseId)
 {
     $list = Comman::convertArrayToSingle($this->getList(array('id'), $courseId), 'id');
     foreach ($list as $item) {
         $this->delete($item);
     }
     return true;
 }
Exemple #2
0
 public static function setConfig($mod, $name, $value)
 {
     $db = new DBManager();
     $table = 'core_conf';
     if (!Comman::isConfig($mod, $name)) {
         return Comman::createConfig($mod, $name, $value);
     }
     return $db->updateSingleColumn($table, 'value', $value, "module='{$mod}' AND name='{$name}'");
 }
Exemple #3
0
 function getNEList($type = null, $limit = null)
 {
     $columns = array(0 => 'uid');
     $wh = "uid!=0 ";
     if ($type != null) {
         $wh = "type='{$type}' ";
     }
     $wh .= "ORDER BY `date` DESC";
     if ($limit != null) {
         $wh .= " LIMIT {$limit}";
     }
     return Comman::convertArrayToSingle($this->db->getDataGrid($this->table, $columns, $wh), 'uid');
 }
<?php

$url = new URL();
$id = $url->getRequestedItem();
$qb = new QuestionBank();
?>
<div class="container">
	<div class="row">
		<form action="<?php 
echo Comman::getController('question');
?>
" method="post"
			ng-submit="add($event)">
			<div class="col-md-6" style="margin-top: 20px;">
				<div class="panel">
					<div class="panel-heading">
						<div class="panel-title">Add question to <?php 
echo $qb->getInfo($id, 'name');
?>
</div>
					</div>
					<div class="panel-body">
	
						<div class="control-group">
							<label for="ques">Question</label> <input ng-model="name"
								class="form-control" type="text" required="required" name="ques"
								id="ques" placeholder="Question" />
						</div>
						<div class="control-group">
							<label for="course">Type</label> <select ng-model="type"
								class="form-control" required="required" name="type" id="type">
Exemple #5
0
<?php

$auth = new Auth();
$config = new Config();
if ($auth->isAdmin()) {
    echo Comman::loadView('admin-dashboard');
} else {
    header("location:" . $config->site_address . "login");
}
Exemple #6
0
        <!-- Start: Sidebar Header -->
        <header class="sidebar-header">

          <!-- Sidebar Widget - Author -->
          <div class="sidebar-widget author-widget">
            <div class="media">
              <a class="media-left" href="#">
                <img src="<?php 
echo $config->site_address;
?>
admin/assets/img/avatars/3.jpg" class="img-responsive">
              </a>
              <div class="media-body">
                <div class="media-links">
                   <a href="#" class="sidebar-menu-toggle">User Menu -</a> <a href="<?php 
echo Comman::getController("logout");
?>
">Logout</a>
                </div>
                <div class="media-author">Admin</div>
              </div>
            </div>
          </div>

          <!-- Sidebar Widget - Menu (slidedown) -->
          <div class="sidebar-widget menu-widget">
            <div class="row text-center mbn">
              <div class="col-xs-4">
                <a href="dashboard" class="text-primary" data-toggle="tooltip" data-placement="top" title="Dashboard">
                  <span class="glyphicon glyphicon-home"></span>
                </a>
Exemple #7
0
 function getImages()
 {
     return explode(";", Comman::getConfig('home', 'images'));
 }
        </div>
    </div>
</section>
<script src="<?php 
echo assets;
?>
theme/js/custom.js"></script>
<?php 
if ($auth->isAdmin()) {
    ?>
  <input type="hidden" value="<?php 
    echo $pm->getCurrentPageId();
    ?>
" id="page-id">
  <input type="hidden" value="<?php 
    echo Comman::getController('page-manager');
    ?>
" id="controller-url">
  <button class="btn btn-colored btn-orange btn-lg page-editor-save-btn hidden">Save</button>
  <div class="alert alert-danger notice center-block hidden page-editor-save-btn-warning">Something went wrong. Data cannot be saved. Please reload page Or try to click on save button again.</div>
  <script type="text/javascript" src="editor/codemirror-5.11/lib/codemirror.js"></script>
  <script type="text/javascript" src="editor/codemirror-5.11/mode/xml/xml.js"></script>

  <script type="text/javascript" src="editor/js/froala_editor.min.js" ></script>

  <script type="text/javascript" src="editor/js/plugins/align.min.js"></script>
  <script type="text/javascript" src="editor/js/plugins/code_beautifier.min.js"></script>
  <script type="text/javascript" src="editor/js/plugins/code_view.min.js"></script>
  <script type="text/javascript" src="editor/js/plugins/colors.min.js"></script>
  <script type="text/javascript" src="editor/js/plugins/emoticons.min.js"></script>
  <script type="text/javascript" src="editor/js/plugins/font_size.min.js"></script>
Exemple #9
0
						<div class="col-sm-6 col-md-3">
							<div class="footer-widget">
								<h5 class="widget-title text-white">Quick Contact<span class="line-bottom"></span></h5>
								<ul>
									<li><a href="callto:<?php 
echo explode(",", Comman::getConfig('contact', 'phone'))[0];
?>
"><?php 
echo explode(",", Comman::getConfig('contact', 'phone'))[0];
?>
</a></li>
									<li><a href="mailto:<?php 
echo explode(",", Comman::getConfig('contact', 'email'))[0];
?>
"><?php 
echo explode(",", Comman::getConfig('contact', 'email'))[0];
?>
</a></li>
									<li><a class="lineheight-20" href="#">Dr. MINAKSHI SWARAJ (Secretary-Cum-Director), <br /> 
101, Yamuna-3, Jalalpurcity, <br />
Ramjan Pal Path, Patna - 801503 <br />
Bihar-INDIA.</a></li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<div class="container-fluid p-20" data-bg-color="#fe9322">
					<div class="row text-center">
						<div class="col-md-12">
							<p class="font-11 text-white m-0">Copyright &copy;2015 Women Line. All Rights Reserved</p>
Exemple #10
0
                            <div class="thumb">
                                <img class="img-responsive" src="<?php 
    echo Comman::getController("dynamicImage");
    ?>
?src=<?php 
    echo Comman::getUrlByDirectoryPath($dir) . DS . $file;
    ?>
&w=370&h=277&zc=0" alt="featured project"  width="476">
                            </div>
                            <div class="overlay text-center">
                                <div class="display-table">
                                    <div class="display-table-cell"><i class="fa fa-link"></i></div>
                                </div>
                            </div>
                            <a class="hover-link" data-lightbox-gallery="gallery" href="<?php 
    echo Comman::getUrlByDirectoryPath($dir) . DS . $file;
    ?>
">View more</a>
                        </div>
                        
					<?php 
}
?>
					</div>
            </div>
        </div>
    </div>
</section>
<script src="<?php 
echo assets;
?>
Exemple #11
0
<section>
	<div class="container">
		<div class="section-content">
			<div class="row multi-row-clearfix">
				<div class="col-lg-4 col-md-6 col-sm-12 mb-10" ng-repeat="video in videos">
					<div class="video" ng-click="openVid(video.contentDetails.videoId)"
						data-id='{{video.contentDetails.videoId}}'>
						<img
							ng-src="http://i1.ytimg.com/vi/{{video.contentDetails.videoId}}/hqdefault.jpg"
							class="img img-responsive"> <span class="play_icon"></span>
					</div>
				</div>
			</div>
			<div class="row text-center">
				<a href="<?php 
echo Comman::getConfig('contact', 'yt');
?>
" target="_blank"
					class="btn btn-colored btn-orange btn-lg">View More</a>
			</div>
		</div>
	</div>
</section>
<div class="modal fade" id="video-viewer" tabindex="-1">
	<div class="modal-dialog" style="z-index: inherit;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span>&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 class="modal-title">Videos</h4>
Exemple #12
0
 function __construct()
 {
     $this->playlist = Comman::getConfig('contact', 'yt');
 }
Exemple #13
0
 function getReferers()
 {
     $where = "admin!=1 GROUP BY `ref`";
     return Comman::convertArrayToSingle($this->db->getDataGrid($this->table, array('ref'), $where), 'ref');
 }
					<tr ng-repeat="exam in exams">
		                <td>{{$index+1}}</td>
		                <td>{{exam.name}}</td>
		                <td>{{exam.start_time}}</td>
		                <td>
		                	<a href="#" class="btn btn-primary" data-toggle="tooltip" title="Add questions"><span class="fa fa-plus"></span></a>
		                	<a href="#" class="btn btn-info" data-toggle="tooltip" title="Edit exam info"><span class="fa fa-edit"></span></a>
		                	<a href="manage-exams" class="btn btn-danger delete" data-toggle="tooltip" title="Delete Exam" ng-click="deleteExam($event, exam.id)"><span class="fa fa-times"></span></a>
		                </td>
	            	</tr>
				</tbody>
			</table>
		</div>
		<div ng-show="create">
			<form action="<?php 
echo Comman::getController('exam');
?>
" method="post" ng-submit="createExam($event)">
				<div class="panel col-md-6" style="margin-top: 20px;">
					<div class="panel-heading">
						<div class="panel-title">Create Exam</div>
					</div>
					<div class="panel-body">
						
							<div class="control-group">
								<label for="name">Name of exam</label>
								<input ng-model="exam_name" class="form-control" type="text" required="required" name="name"  id="name" placeholder="Name of exam" />
							</div>
							<div class="control-group" style="margin-top: 20px;">
								<label for="exam_type">Auto Start</label>
								<input type="checkbox" ng-model="exam_type" class="form-control" id="exam_type" style="display: inline; margin-left: 20px;" />
				<tbody>
					<tr ng-repeat="course in courses">
		                <td>{{$index+1}}</td>
		                <td>{{course.course_name}}</td>
		                <td>
		                	<a href="#" class="btn btn-primary" data-toggle="tooltip" title="Add questions"><span class="fa fa-plus"></span></a>
		                	<a href="#" class="btn btn-info" data-toggle="tooltip" title="Edit exam info"><span class="fa fa-edit"></span></a>
		                	<a href="manage-courses" class="btn btn-danger delete" data-toggle="tooltip" title="Delete Course" ng-click="delete($event, course.id)"><span class="fa fa-times"></span></a>
		                </td>
	            	</tr>
				</tbody>
			</table>
		</div>
		<div ng-show="create">
			<form action="<?php 
echo Comman::getController('courses');
?>
" method="post" ng-submit="add($event)">
				<div class="panel col-md-6" style="margin-top: 20px;">
					<div class="panel-heading">
						<div class="panel-title">Create Course</div>
					</div>
					<div class="panel-body">
						
							<div class="control-group">
								<label for="name">Name of course</label>
								<input ng-model="name" class="form-control" type="text" required="required" name="name"  id="name" placeholder="Name of Course" />
							</div>
							<div class="control-group">
								<button type="submit" class="btn btn-primary" style="margin-top: 20px;">Create</button>
							</div>
Exemple #16
0
<?php

include 'core/includes.php';
$url = new URL();
$mod = $url->getRequestedModule();
Comman::loadModule($url->getRequestedModule(), $_REQUEST);
Message::getMessage();
<?php

$auth = new Auth();
$config = new Config();
if ($auth->isAdmin()) {
    echo Comman::loadView('admin-dashboard');
} else {
    if ($auth->isItAuthUser()) {
        echo Comman::loadView('student-dashboard');
    } else {
        header("location:" . $config->site_address . "login");
    }
}
Exemple #18
0
<?php

include '../core/includes.php';
$config = new Config();
$auth = new Auth();
if (!$auth->isAdmin()) {
    header("Location:" . $config->site_address . "login");
}
$param = array("phone", "email", "fb", "tw", "gp", "yt");
foreach ($param as $p) {
    if (isset($_POST[$p])) {
        Comman::setConfig("contact", $p, $_POST[$p]);
    }
}
header("Location:" . $_POST['return_path']);
<?php

echo Comman::loadView('admin-header');
echo Comman::loadView('admin-footer');
					<tr ng-repeat="qb in qbs">
		                <td>{{$index+1}}</td>
		                <td>{{qb.name}}</td>
		                <td>{{qb.course_name}}</td>
		                <td>
		                	<a href="add-question/{{qb.id}}" class="btn btn-primary" data-toggle="tooltip" title="Add questions"><span class="fa fa-plus"></span></a>
		                	<a href="#" class="btn btn-info" data-toggle="tooltip" title="Edit exam info"><span class="fa fa-edit"></span></a>
		                	<a href="manage-question" class="btn btn-danger delete" data-toggle="tooltip" title="Delete Question Bank" ng-click="delete($event, qb.id)"><span class="fa fa-times"></span></a>
		                </td>
	            	</tr>
				</tbody>
			</table>
		</div>
		<div ng-show="create">
			<form action="<?php 
echo Comman::getController('question_bank');
?>
" method="post" ng-submit="add($event)">
				<div class="panel col-md-6" style="margin-top: 20px;">
					<div class="panel-heading">
						<div class="panel-title">Create Question Bank</div>
					</div>
					<div class="panel-body">
						
							<div class="control-group">
								<label for="name">Name of exam</label>
								<input ng-model="name" class="form-control" type="text" required="required" name="name"  id="name" placeholder="Name of exam" />
							</div>
							<div class="control-group">
								<label for="course">Course</label>
								<select ng-model="course" class="form-control"  required="required" name="course"  id="course">