Ejemplo n.º 1
0
<?
session_start();
header("cache-control: no-cache"); 
require_once("../../../config.php");
require_once("../../common/dbConnection.php"); 
require_once("../dbUtils.php");
require_once("dbUtilsUpPhoto.php");
$table=$_REQUEST['table'];
if($table=='subjects_subjects'){
	if(!chechUserPermissions('enterNewSubject.php') || !chechUserPermissions('editSubject.php')){
		session_destroy();
		@header("location:/");
		exit;
	}
}
if(checkGallogin()){  
	$img_arr = array("flv","mp4","wmv","avi");	
	$ret='';
	$ph=$_POST['attachs'];
	$photos=explode(',',$ph);
	$root='../../../uploads/videos/';
	
	$photos=explode(',',$ph);
	if ($Folder = opendir($root)){
		$i=0;
		while (false !== ($file = readdir($Folder))){
			if ($file != "." && $file != "..") {
				$fileNameParts = explode(".",$file);
				$Ex =strtolower(end($fileNameParts));
				if(in_array($Ex,$img_arr)){
					if(!is_dir($root.$file)){
Ejemplo n.º 2
0
function getLinks($id_value, $name = "item_link", $class = "", $script = "", $linkPref = null, $lang = "")
{
    global $VIEWLang;
    if ($lang != '') {
        $VIEWLang = $lang;
    }
    $result = "<select name=\"{$name}\" id=\"{$name}\" class=\"{$class}\" {$script}>\n";
    //if ($id_value == null || $id_value == "") $result .= "<option></option>\n";
    $result .= '<option value="#">--------</option>';
    //$result .= "<option value='#'>$linkPref</option>\n";
    $langStmt = " lang='" . $VIEWLang . "' ";
    // Pages
    $result .= addToCombobox("Text Pages", "id", "title", "pages_pages", $langStmt, $linkPref . $VIEWLang . "/Page#ID#/#TITLE#", $id_value);
    // Forms
    $result .= addToCombobox("Forms", "id", "form_name", "qforms_qforms", $langStmt, $linkPref . $VIEWLang . "/Form#ID#/#TITLE#", $id_value);
    // Gallery
    $result .= addToCombobox("Galleries", "id", "name", "galleries_galleries", $langStmt, $linkPref . $VIEWLang . "/Gallery#ID#/#TITLE#", $id_value);
    $result .= addToCombobox("College", "id", "name_" . $VIEWLang, "college", '', $linkPref . $VIEWLang . "/College#ID#", $id_value);
    $result .= addToCombobox("Directorates", "id", "name_" . $VIEWLang, "st_directorates", '', $linkPref . $VIEWLang . "/Directorates#ID#", $id_value);
    $result .= addToCombobox("Publication", "id", "name_" . $VIEWLang, "publication_type", '', $linkPref . $VIEWLang . "/Publication/Type#ID#/", $id_value);
    $result .= addToCombobox("CL", "id", "name_" . $VIEWLang, "lab_type", '', $linkPref . $VIEWLang . "/CL/Type#ID#/#TITLE#", $id_value);
    $result .= addToCombobox("Boards", "id", "name_" . $VIEWLang, "st_league_council", '', $linkPref . $VIEWLang . "/Council#ID#", $id_value);
    // Modules
    $result .= '<optgroup label="Modules">';
    $res = mysql_query("select * from menu_modules where active=1 ");
    while ($row = mysql_fetch_array($res)) {
        $sel = '';
        $Mpage = $linkPref . $VIEWLang . '/' . $row['page'];
        if ($id_value == $Mpage) {
            $sel = " selected ";
        }
        $result .= '<option value="' . $Mpage . '" ' . $sel . ' >' . $row['name'] . '</option>';
    }
    $result .= "</optgroup>\n";
    // Subject Types
    if (chechUserPermissions('listSubjects')) {
        $result .= addToCombobox("Subject Types", "id", "name_" . $VIEWLang, "subjects_types", "", $linkPref . $VIEWLang . "/AllSubjects#ID#/#TITLE#", $id_value);
    }
    if (chechUserPermissions('listProducts')) {
        $result .= addToCombobox("Products Categories", "id", "name_en", "products_category", "", $linkPref . $VIEWLang . "/Products/C#ID#/#TITLE#", $id_value);
    }
    $result .= "</select>\n";
    return $result;
}
Ejemplo n.º 3
0
<?php

session_start();
define('GOOD', True);
header("cache-control: no-cache");
require_once "../../../config.php";
require_once "../../common/dbConnection.php";
require_once "../dbUtils.php";
require_once "dbUtilsGallary.php";
if (!chechUserPermissions('listGalleries.php')) {
    session_destroy();
    @header("location:/");
    exit;
}