$lefty) $last_left_block_order = $lefty['succession']; $left_block_order = $last_left_block_order + 1; foreach($template_right_db as $idx=>$righty) $last_right_block_order = $righty['succession']; $right_block_order = $last_right_block_order + 1; if($mode == "Left") $db->insertRow("template",array('mode' => 'left','name' => ''.$add_block.'','succession' => ''.$left_block_order.'')); if($mode == "Right") $db->insertRow("template",array('mode' => 'right','name' => ''.$add_block.'','succession' => ''.$right_block_order.'')); } else { foreach($template_left_db as $idx=>$lefty) $last_left_block_order = $lefty['succession']; $left_block_order = $last_left_block_order + 1; $db->insertRow("template",array('mode' => 'left','name' => ''.$add_block.'','succession' => ''.$left_block_order.'')); } //----------------------------------------------------------------- // Activate the block //----------------------------------------------------------------- $db->updateRow("blocks",array('used' => '1'),"name = '$add_block'"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/layout&i=59"); break; //----------------------------------------------------------------- // Delete block from template //----------------------------------------------------------------- case 2: //----------------------------------------------------------------- // Deactivate the block //----------------------------------------------------------------- $checker = $db->getLine("SELECT * FROM template WHERE id = '$d'"); $db->updateRow("blocks",array('used' => '0'),"name = '{$checker['name']}'"); //----------------------------------------------------------------- // Delete the block //----------------------------------------------------------------- $db->deleteRow("template","id = '$d'"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/layout&i=60"); break; //----------------------------------------------------------------- // Save block succession //----------------------------------------------------------------- case 3: //----------------------------------------------------------------- // Save the succession //----------------------------------------------------------------- foreach($succession as $idx=>$val) $db->query("Update `template` set `succession` = '$val' WHERE `id` = '$idx'"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/layout&i=61"); break; //----------------------------------------------------------------- // Show list + form //----------------------------------------------------------------- default: //----------------------------------------------------------------- // Code for Left Block //----------------------------------------------------------------- if(!isset($leftblock)) $leftblock = NULL; if($template_left_db != FALSE) { foreach($template_left_db as $idx=>$lefty) { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $leftblock .= " {$lefty['name']} {$language[ "; } } else { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $leftblock .= " {$language['Layout view left desc4']} \n"; } //----------------------------------------------------------------- // Code for Right Block //----------------------------------------------------------------- if($template_mode == "2") { if(!isset($rightblock)) $rightblock = NULL; if($template_right_db != FALSE) { foreach($template_right_db as $idx=>$righty) { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $rightblock .= " {$righty['name']} {$language[ "; } } else { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $rightblock .= " {$language['Layout view right desc4']} \n"; } } //----------------------------------------------------------------- // Echo the back link //----------------------------------------------------------------- echo "
{$language['Admin name']}
» {$language['Admin back']}

"; //----------------------------------------------------------------- // Get blocks table //----------------------------------------------------------------- $blocks_db_layout = $db->getTable("SELECT * FROM blocks WHERE used = '0'") ?>

 

' tabindex='3'>