Beispiel #1
0
                echo '<script>routine_delete_success();</script>';
                echo "<meta http-equiv='refresh' content='2;url=http://" . $path . "'>";
            } else {
                echo '<script>error();</script>';
            }
        }
    }
}
$classes = array();
foreach ($pdo->query("SELECT `class` FROM `scl_class_routine` GROUP BY `class`") as $studentClass) {
    $classes[] = $studentClass['class'];
}
$rows = array();
foreach ($classes as $class) {
    $where = array('class' => $class);
    $rows[] = db_get_where('scl_class_routine', $where);
}
if (empty($rows)) {
    ?>
      <div class="col-md-12">
        <div class="panel">
          <div class="panel-body">
            <div class="alert alert-info alert-block">
              <h4>
                  <i class="fa fa-ok-sign"></i>
                  No Data Found!
              </h4>
              <p>&nbsp;<?php 
    echo is_admin() ? 'Add a New Data from Add Routine Button.' : 'No routine data found in your class.';
    ?>
</p>
Beispiel #2
0
                $where = array('username' => 'student_' . $std_id);
                $success = db_delete('vor_admin', $where);
            }
            if ($success) {
                extract(parse_url($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
                echo '<script>std_delete_success();</script>';
                echo "<meta http-equiv='refresh' content='2;url=http://" . $path . "'>";
            } else {
                echo '<script>error();</script>';
            }
        }
    }
}
if (isset($_GET['class']) && !empty($_GET['class'])) {
    $class = sanitize($_GET['class']);
    $rows = db_get_where('scl_students', array('class' => $class));
    if (count($rows) == 0) {
        echo '<div class="col-md-12">
        <div class="panel">
          <div class="panel-body">
            <div class="alert alert-info alert-block">
              <h4>
                  <i class="fa fa-ok-sign"></i>
                  No Data Found!
              </h4>
              <p>&nbsp;No Student found in class ' . $class . '</p>
            </div>              
          </div>
        </div>
      </div>';
    } else {
Beispiel #3
0
 public function is_row_exists($config)
 {
     if (count(db_get_where($config['table'], $config['where'])) != 0) {
         return true;
     } else {
         return false;
     }
 }
<?php

session_start();
if (isset($_SESSION['username'])) {
    require_once '../../../lib/config.php';
    require_once '../../../lib/function.php';
    if (isset($_POST['action'])) {
        if ($_POST['action'] == 'getInfo') {
            $config = ['table' => $_POST['table'], 'username' => ['username' => $_POST['username']]];
            $profileInfo = db_get_where($config['table'], $config['username']);
            echo json_encode($profileInfo);
        } elseif ($_POST['action'] == 'deleteProfile') {
            $where = ['username' => $_POST['username']];
            $status = db_delete($_POST['table'], $where);
            echo json_encode($status ? ['status' => 1] : ['status' => 0]);
        }
    }
} else {
    echo json_encode(['error' => 'you are not authorized']);
}
Beispiel #5
0
                echo '<script>routine_delete_success();</script>';
                echo "<meta http-equiv='refresh' content='2;url=http://" . $path . "'>";
            } else {
                echo '<script>error();</script>';
            }
        }
    }
}
$classes = array();
foreach ($pdo->query("SELECT `class` FROM `scl_exam_routine` GROUP BY `class`") as $studentClass) {
    $classes[] = $studentClass['class'];
}
$rows = array();
foreach ($classes as $class) {
    $where = array('class' => $class);
    $rows[] = db_get_where('scl_exam_routine', $where);
}
if (empty($rows)) {
    ?>
      <div class="col-md-12">
        <div class="panel">
          <div class="panel-body">
            <div class="alert alert-info alert-block">
              <h4>
                  <i class="fa fa-ok-sign"></i>
                  No Data Found!
              </h4>
              <p>&nbsp;<?php 
    echo is_admin() ? 'Add a New Data from Add Routine Button.' : 'No routine data found in your class.';
    ?>
</p>
Beispiel #6
0
<?php

$username = $_SESSION['username'];
preg_match("/student_(.*)/", $username, $student_id);
$student_id = $student_id[1];
$rows = db_get_where('scl_students', array('id' => $student_id));
$plug_path = plugin_path('school_management_vor');
$img_path = $plug_path . 'images/scl_students/' . $rows[0]['image'];
if (empty($rows[0]['image'])) {
    $image = $plug_path . 'images/default_image.png';
} else {
    $image = file_exists($img_path) ? $img_path : $plug_path . 'images/default_image.png';
}
?>
<div class="row">
  <aside class="profile-nav col-lg-3">
    <section class="panel">
      <div class="user-heading round">
        <a href="#">
          <img src="<?php 
echo $image;
?>
" alt="">
        </a>
        <h1><?php 
echo $rows[0]['name'];
?>
</h1>
        <p><?php 
echo $rows[0]['email'];
?>
Beispiel #7
0
<?php

$rows = db_get_where('vor_admin', array('username' => $_SESSION['username']));
$plug_path = plugin_path('school_management_vor');
$img_path = $plug_path . 'images/scl_students/' . $rows[0]['image'];
if (empty($rows[0]['image'])) {
    $image = $plug_path . 'images/default_image.png';
} else {
    $image = file_exists($img_path) ? $img_path : $plug_path . 'images/default_image.png';
}
?>

<div class="row">
	<aside class="profile-nav col-lg-3">
		<section class="panel">
			<div class="user-heading round">
				<a href="#">
					<img src="<?php 
echo $image;
?>
" alt="">
				</a>
				<h1><?php 
echo $rows[0]['full_name'];
?>
</h1>
				<p><?php 
echo $rows[0]['email'];
?>
</p>
			</div>