'transitionIn'		: 'none',
					'transitionOut'		: 'none',
					'titlePosition' 	: 'over',
					'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
						return '<span id="fancybox-title-over" >Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
					}
				});
	});
</script>
	
	<div id="body">	
		
		<div id="firstColumn" >
		<div >
			<input id="add_item_buttom" type="button" style="width:<?php 
echo strlen($index->toView($T)) * 9;
?>
px" onClick="window.location='<?php 
echo $T;
?>
.php'" value="<?php 
echo $index->toView($T);
?>
" >
		</div>
		<table >
			<?php 
foreach ($menu['menu_pages'] as $menu_id => $mnu) {
    $display_name = $menu['menu_display_names'][$menu_id];
    //var_dump($menu['menu_pages']); die();
    ?>
예제 #2
0
<?php

session_start();
require_once "../connection/connect.php";
require_once "../../models/index/index.php";
require_once "../../models/index/simpleImage.php";
$cnct = new cnct_class();
$cnx = $cnct->cnct();
$index_data['cnx'] = $cnx;
$index = new index($index_data);
$image = new simpleImage($index_data);
$table = $_GET['table'];
$Table = $index->capitalize($table);
$id = $_GET['id'];
$file = $_GET['file'];
if ($index->deleteFile($table . '/' . $id . '/' . $file)) {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' File Deleted');
} else {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' File Not Deleted,Please Try Again');
}
                $dataUploadFile['folder'] = $index->getFolderPath($data['control_p_folder_id']);
            }
            $dataUploadFile['_FILES'] = $_FILES;
            $dataUploadFile['type'] = $index->getColumnIndex('file', $table);
            //$dataFile = array();
            //$dataTmpFile = array();
            $fileName = $image->uploadFile($dataUploadFile, 'file');
            if (!$fileName) {
                echo 'File Was Not Uploaded,Please Try Again';
                die;
            }
            $data['path'] = $fileName;
        }
    }
    //****************************************************************************************
}
$itemExist = $index->checkGeneralItemIfExist($id = '0', $data, $table);
if ($itemExist) {
    $note = $index->toView($Table) . ' Exist';
} else {
    if ($itemAdded = $index->addGeneralItem($data, $table)) {
        $note = $index->toView($Table) . ' Added';
    } else {
        $note = $index->toView($Table) . ' Not Added,Please Try Again';
    }
}
echo $note;
?>
</p>
</body>
</html>
예제 #4
0
    die;
}
//$index->show($tablesData);
$post = $tablesData;
$added = array();
$min = 0;
$max = 0;
//maximum number of parent forign keys in table
foreach ($seq as $table1 => $parents1) {
    if (count($parents1) > $max) {
        $max = count($parents1);
    }
}
if (isset($existData)) {
    foreach ($existData as $tbl => $out) {
        echo $index->toView($tbl) . ' ' . $out . ' Already Exists<br/>';
    }
    //echo('<script language="javascript" > window.location="../../index/manageImages.php?table='.$_GET["table"].'&id='.$_GET["id"].'&note=Please Try Again"; }</script>');
    echo 'Please Try Again';
    die;
}
foreach ($seq as $table => $parents) {
    $thisId = $table . '_id';
    $added[$table] = $index->addGeneralItem($post[$table], $table);
    if (!$added[$table]) {
        $error = true;
    }
    foreach ($seq as $table2 => $parents2) {
        if (is_array($parents2)) {
            switch (count($parents2)) {
                case 0:
예제 #5
0
<?php

require_once '../public/configuration.php';
require_once '../public/layouts/theme_1/_header.html';
require_once "../models/index/index.php";
$index = new index();
$cnct = new cnct_class();
$cnct->cnct();
$table = $_GET['table'];
$TABLE = $index->capitalize($table);
$selecBoxName = 'company_username';
$Table = $index->toView($table);
$cols = $index->getGeneralColums($table);
$keys = $cols['keys'];
$PRI = $cols['primaryKeys'];
$PRI = $PRI[0];
if (isset($_GET[$PRI])) {
    if ($_GET[$PRI] != '0') {
        $selectedItemId = $_GET[$PRI];
        if (!$index->checkIdIfExist($selectedItemId, $table)) {
            header('Location:index.php?note=Invalid Inputs');
        }
        $Aitm = $index->getGeneralItemById($selectedItemId, $table);
        $itm = $Aitm[$selectedItemId];
    }
}
?>
<div id="body">	
		
		<div id="firstColumn" >
		<div >
        }
    }
}
//**************************** save schedule as array ********************************
if (isset($setSchedule)) {
    //
    $data['schedule'] = serialize($schedule);
    //
}
//
//**************************** save schedule as array ********************************
//$index->show($schedule);
$id = $_POST['item'];
$itemExist = $index->checkGeneralItemIfExist($id, $data, $table);
if ($itemExist) {
    header('Location: ../../index/edit' . $Table . '.php?id=' . $id . '&note=' . $index->toView($Table) . ' Name Exist');
    exit;
} else {
    //******************************************* IN CASE THERE IS IMAGE *****************************************
    if (isset($_FILES)) {
        if (array_key_exists('image_id', $_FILES)) {
            if ($_FILES['image_id']['tmp_name'] != '') {
                $dataImage = array();
                $dataTmp = array();
                if ($dataTmp['name'] = $image->uploadImage($_FILES, 'image_id')) {
                    if ($image->masterImage($dataTmp)) {
                        $dataImage['name'] = $dataTmp['name'];
                        $item = $index->getGeneralItemById($id, $table);
                        $idImage = $item[$id]['image_id'];
                        $imgItem = $index->getGeneralItemById($idImage, 'image');
                        $oldImage = $imgItem[$idImage]['name'];
    $newData[$PT1 . '_id'] = $_POST[$PT1 . '_id'];
    //setting the new data would be added to the table. this represents the selected item to be edited
    //var_dump($old);die();
    foreach ($_POST[$PT2] as $key2 => $val) {
        $newData[$PT2 . '_id'] = $val;
        //setting the new data would be added to the table. this represents the checked sub-item that is assigned to be item edited
        //var_dump($newData);die();
        if (!$index->addGeneralItem($newData, $table)) {
            $result = false;
            break;
        } else {
            $result = true;
        }
    }
    if ($result) {
        header('Location: ../../index/' . $table . '.php?note=' . $index->toView($Table) . ' Edited');
    } else {
        header('Location: ../../index/' . $table . '.php?note=' . $index->toView($table) . ' Not Edited,Please Try Again');
    }
} else {
    header('Location: ../../index/' . $table . '.php?note=' . $index->toView($Table) . ' Not Edited,Please Try Again');
}
//var_dump($oldData);die();
/*
$itemExist=$index->checkGeneralItemIfExist($id,$data,$table);
if($itemExist)
{
	header('Location: ../../index/'.$table.'.php?note='.$index->toView($Table).' Name Exist');
	exit;
}
else
예제 #8
0
$index = new index($index_data);
$image = new simpleImage($index_data);
$table = $_POST['table'];
$Table = $index->capitalize($table);
$id = $_POST['id'];
$keep_parent = '';
if (isset($_POST['keep_parent'])) {
    $keep_parent = '&' . $_POST['keep_parent'] . '=' . $_POST[$_POST['keep_parent']];
}
//$index->show($_FILES);
$itemAdded = 0;
$done = true;
if (isset($_FILES)) {
    foreach ($_FILES as $key => $post) {
        if ($post['error'] == '0') {
            $post['table'] = $table;
            $post['id'] = $id;
            //$index->show($post);
            $res = $index->uploadFile($post);
            if ($res) {
                $done = false;
            }
            // $name,$status
        }
    }
}
if (!$done) {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' Files Uploaded' . $keep_parent);
} else {
    header('Location: ../../index/manageFiles.php?table=' . $table . '&id=' . $id . '&note=' . $index->toView($Table) . ' Files Not Uploaded,Please Try Again' . $keep_parent);
}
		if(!is_array($data0))
		{
			if($data0=="exists")
			{
				echo $index->toView($table).' Already Exists<br/>';
				
			}
		}
	}
*/
foreach ($seq as $table => $parents) {
    if ($tablesData[$table] != "exists") {
        $added[$table] = $index->editGeneralItem($ids[$table], $post[$table], $table);
    } else {
        if (isset($existData[$table])) {
            echo $index->toView($table) . ' ' . $existData[$table] . ' Already Exists<br/>';
        }
    }
}
if (mysql_error() == '') {
    unset($tablesData);
    //unset($_SESSION['postData']);
    echo 'Changes Saved';
} else {
    //die(mysql_error());
    echo 'Please Try Again';
}
?>
</p>
</body>
</html>
        $data['content_code'] = $data['content_code'] . '</li>';
    }
    $data['content_code'] = $data['content_code'] . '</ul>';
}
//**************************** save table as html ********************************
//$index->show($data);die();
if (isset($_FILES)) {
    if (array_key_exists('image_id', $_FILES)) {
        if ($_FILES['image_id']['tmp_name'] != '') {
            $dataImage = array();
            $dataTmp = array();
            if ($dataTmp['name'] = $image->uploadImage($_FILES, 'image_id')) {
                if ($image->masterImage($dataTmp)) {
                    $dataImage['name'] = $dataTmp['name'];
                    $data['image_id'] = $index->addGeneralItem($dataImage, 'image');
                }
            }
        }
    }
}
$itemExist = $index->checkGeneralItemIfExist($id = '0', $data, $table);
if ($itemExist) {
    $note = $index->toView($Table) . ' Exist' . $keep_parent;
} else {
    if ($itemAdded = $index->addGeneralItem($data, $table)) {
        $note = $index->toView($Table) . ' Added' . $keep_parent;
    } else {
        $note = $index->toView($Table) . ' Not Added,Please Try Again' . $keep_parent;
    }
}
echo $note;
        }
    }
}
//**************************** save schedule as array ********************************
if (isset($setSchedule)) {
    //
    $data['schedule'] = serialize($schedule);
    //
}
//
//**************************** save schedule as array ********************************
//$index->show($schedule);
$id = $_POST['item'];
$itemExist = $index->checkGeneralItemIfExist($id, $data, $table);
if ($itemExist) {
    $note = $index->toView($Table) . ' ' . $itemExist . ' Exists';
} else {
    //******************************************* IN CASE THERE IS IMAGE *****************************************
    if (isset($_FILES)) {
        if (array_key_exists('image_id', $_FILES)) {
            if ($_FILES['image_id']['tmp_name'] != '') {
                $dataImage = array();
                $dataTmp = array();
                if ($dataTmp['name'] = $image->uploadImage($_FILES, 'image_id')) {
                    if ($image->masterImage($dataTmp)) {
                        $dataImage['name'] = $dataTmp['name'];
                        $item = $index->getGeneralItemById($id, $table);
                        $idImage = $item[$id]['image_id'];
                        $imgItem = $index->getGeneralItemById($idImage, 'image');
                        $oldImage = $imgItem[$idImage]['name'];
                        if ($idImage != '0') {
예제 #12
0
$FDext['multiFilterBy'][] = $tableFilter;
$extRow = $index->getAllGeneralItemsWithJoins($FDext, 'files');
$extValue = array_values($extRow);
// rest the index of array to 0
$extensions = $extValue[0]['extensions'];
//$index->show($extensions);
//*********************************************** get allowed extentions end ***********************
$all = 2;
?>

	<div id="body">	
		
		<div id="firstColumn" >
		<div >
			<input id="add_item_buttom" type="button" style="width:<?php 
echo strlen($index->toView($T)) * 9;
?>
px" onClick="window.location='<?php 
echo $T;
?>
.php'" value="<?php 
echo $index->toView($T);
?>
" >
		</div>
		<table >
			<?php 
foreach ($menu['menu_pages'] as $menu_id => $mnu) {
    $display_name = $menu['menu_display_names'][$menu_id];
    //var_dump($menu['menu_pages']); die();
    ?>
        $data['content_code'] = $data['content_code'] . $dataList[$j];
        $data['content_code'] = $data['content_code'] . '</li>';
    }
    $data['content_code'] = $data['content_code'] . '</ul>';
}
//**************************** save table as html ********************************
//$index->show($data);die();
if (isset($_FILES)) {
    if (array_key_exists('image_id', $_FILES)) {
        if ($_FILES['image_id']['tmp_name'] != '') {
            $dataImage = array();
            $dataTmp = array();
            if ($dataTmp['name'] = $image->uploadImage($_FILES, 'image_id')) {
                if ($image->masterImage($dataTmp)) {
                    $dataImage['name'] = $dataTmp['name'];
                    $data['image_id'] = $index->addGeneralItem($dataImage, 'image');
                }
            }
        }
    }
}
$itemExist = $index->checkGeneralItemIfExist($id = '0', $data, $table);
if ($itemExist) {
    header('Location: ../../index/add' . $Table . '.php?note=' . $index->toView($Table) . ' Exist' . $keep_parent);
} else {
    if ($itemAdded = $index->addGeneralItem($data, $table)) {
        header('Location: ../../index/add' . $Table . '.php?note=' . $index->toView($Table) . ' Added' . $keep_parent);
    } else {
        header('Location: ../../index/add' . $Table . '.php?note=' . $index->toView($Table) . ' Not Added,Please Try Again' . $keep_parent);
    }
}