Ejemplo n.º 1
0
<?php

date_default_timezone_set('Australia/Canberra');
require "dal_pb.php";
if (!isset($_GET["id"])) {
    echo '<script type="text/javascript">', 'window.location.href="admin/";', '</script>';
}
$e_template = "1";
$pr = getPracticeById($_GET["id"]);
$rowCount = mysql_num_rows($pr);
if ($rowCount > 0) {
    while ($r1 = mysql_fetch_array($pr)) {
        $e_template = $r1['template_id'];
    }
}
if ($e_template == '1') {
    include "template1.php";
} else {
    if ($e_template == '2') {
        include "template2.php";
    } else {
        include "template3.php";
    }
}
Ejemplo n.º 2
0
<?php

require "../dal_pb.php";
if (!isset($_SESSION['acc_type']) || !isset($_SESSION['id']) || $_SESSION['acc_type'] != '2') {
    echo '<script type="text/javascript">', 'window.location.href="index.php";', '</script>';
} else {
    $pr = getPracticeById($_SESSION["id"]);
    $rowCount = mysql_num_rows($pr);
    if ($rowCount > 0) {
        while ($r1 = mysql_fetch_array($pr)) {
            $template = $r1['template_id'];
        }
    }
}
$e_logo = '';
$d_id = '';
$e_des = '';
$error = '';
$uniqid = '';
if ($_POST) {
    // Check if image file is a actual image or fake image
    if (isset($_FILES["txtLogo"]) && $_FILES["txtLogo"]["name"] != '') {
        $target_dir = "../upload/";
        $uniqid = uniqid();
        $target_file = $target_dir . $uniqid . basename($_FILES["txtLogo"]["name"]);
        $uploadOk = 1;
        $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION);
        $check = getimagesize($_FILES["txtLogo"]["tmp_name"]);
        if ($check !== false) {
            $uploadOk = 1;
        } else {