Location: PHPKode > projects > ChiCoMaS - Chilek CMS > chicomas/modules/structure/structure_operation.php
<?
//*****************************************************************************
function Create_Tab_Menu($request){

	global $module;
	global $module_path;

	$sf = $request['sf'];

	$content = "
	<div id=\"navcontainer\">
	<ul id=\"navlist\">";

	$current = "id=\"current\"";
	$active = "id=\"active\"";


	$content .= "<li><a href=\"".basename($PHP_SELF)."?mode=admin\">"._CONTROL_PANEL_."</a></li>";

	switch ($sf){
	default:
		$content .= "<li $active><a href=\"".basename($PHP_SELF)."?f=structure\" $current>"._CP_PAGE_ADMINISTRATION_."</a></li>";
	break;
	case 'add':
		$content .= "<li><a href=\"".basename($PHP_SELF)."?f=structure\">"._CP_PAGE_ADMINISTRATION_."</a></li>";
		$content .= "<li $active><a href=\"".basename($PHP_SELF)."?f=structure&sf=add\" $current>"._CP_PA_NEW_PAGE_."</a></li>";
	break;
	case 'edit':
		$content .= "<li><a href=\"".basename($PHP_SELF)."?f=structure\">"._CP_PAGE_ADMINISTRATION_."</a></li>";
		$content .= "<li $active><a href=\"".basename($PHP_SELF)."?f=structure&sf=edit\" $current>"._CP_PA_EDIT_PAGE_."</a></li>";
	break;
	case 'delete':
		$content .= "<li><a href=\"".basename($PHP_SELF)."?f=structure\">"._CP_PAGE_ADMINISTRATION_."</a></li>";
		$content .= "<li $active><a href=\"".basename($PHP_SELF)."?f=structure&sf=delete\" $current>"._CP_PA_DELETE_PAGE_."</a></li>";
	break;
	case 'sortby':
		$content .= "<li><a href=\"".basename($PHP_SELF)."?f=structure\">"._CP_PAGE_ADMINISTRATION_."</a></li>";
		$content .= "<li $active><a href=\"".basename($PHP_SELF)."?f=structure&sf=sortby\" $current>"._CP_PA_SORT_BY_PAGE_."</a></li>";
	break;
	}

	$content .= "
	</ul>
	</div>";

	return $content;
};

//*****************************************************************************
function Structure_Operation_Menu(){

	$content .= "
	<table width=\"90%\" height=\"100%\">
	<tr>
		<td align=\"center\" width=\"20%\">
			<a href=\"".basename($PHP_SELF)."?f=structure&sf=add\">
				<img src=\"./images/icon48/new.png\" width=\"48\" height=\"48\" border=\"0\"><br>
				"._CP_PA_NEW_PAGE_."
			</a>
		</td>
		<td align=\"center\" width=\"20%\">
			<a href=\"".basename($PHP_SELF)."?f=structure&sf=edit\">
				<img src=\"./images/icon48/edit.png\" width=\"48\" height=\"48\" border=\"0\"><br>
				"._CP_PA_EDIT_PAGE_."
			</a>
		</td>
		<td align=\"center\" width=\"20%\">
			<a href=\"".basename($PHP_SELF)."?f=structure&sf=delete\">
				<img src=\"./images/icon48/delete.png\" width=\"48\" height=\"48\" border=\"0\"><br>
				"._CP_PA_DELETE_PAGE_."
			</a>
		</td>
		<td align=\"center\" width=\"20%\">
			<a href=\"".basename($PHP_SELF)."?f=structure&sf=sortby\">
				<img src=\"./images/icon48/sort.png\" width=\"48\" height=\"48\" border=\"0\"><br>
				"._CP_PA_SORT_BY_PAGE_."
			</a>
		</td>
		<td align=\"center\" width=\"20%\">
		</td>
	</tr>
	</table>";

	return $content;
};



//*****************************************************************************
function Structure_Operation($request){
	$content = null;

	$sf = $request['sf'];

	$content = Create_Tab_Menu($request);

	switch ($sf){
	default:
		$content .= Structure_Operation_Menu();
	break;
	case 'add':
		require("./modules/structure/addnewpage_operation.php");
		$content .= AddNewPage_Operation($request);
	break;
	case 'edit':
		require("./modules/structure/editpage_operation.php");
		$content .= EditPage_Operation($request);
	break;
	case 'delete':
		require("./modules/structure/deletepage_operation.php");
		$content .= DeletePage_Operation($request);
	break;
	case 'sortby':
		require("./modules/structure/sortbypage_operation.php");
		$content .= SortByPage_Operation($request);
	break;
	}

	return $content;
}

?>
Return current item: ChiCoMaS - Chilek CMS