Location: PHPKode > projects > Katyshop > katyshop_ro_0.3.2.1/web/admin/includes/select_parent_category.php
<?php
/**
 * Product: Katyshop
 * @version 0.3.2.1
 * @author Catalin Hulea - hide@address.com
 * @copyright Copyright (C) 2007 Catalin Hulea
 * @license GNU General Public License version 3
 * 			You can find a copy of GNU GPL v3 at this path: /docs/LICENSE
 * @link https://sourceforge.net/projects/katyshop
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

$db = Application::getDb();
$c = $db->tbCategory->getRecordById(@$_GET["id_category"]);
$id_destination = 0;
if(isset($_GET["id_destination"]))
	$id_destination = $_GET["id_destination"];
else
	$id_destination = $c->id_parent;

$dest = $db->tbCategory->getRecordById($id_destination);
if($dest->id == 0)
	$dest->title = APP_NAME;
?>
<dl>
<dt></dt>
<dd>
	<h2>Mutati categoria <?php echo Escape::html($c->title); ?></h2>
	<p>Selectati categoria parinte: </p>
	<div class="categories">
	<ul>
	<li class="expanded">
	<a href="admin/category.php?action=change_parent&id_category=<?php echo intval(@$_GET["id_category"]); ?>&id_destination=0" <?php echo ($id_destination == 0) ? 'class="active"' : ''; ?>><?php echo Escape::html(APP_NAME); ?></a>
	<?php
	$breadCrumb = $db->tbCategory->getBreadcrumb($id_destination);
	displayDestinationTree($breadCrumb);
	?>
	</li>
	</ul>
	</div>

	<form action="admin/formparser/category.php?action=change_parent" method="post">
	<input type="hidden" name="id_category" value="<?php echo intval($c->id); ?>">
	<input type="hidden" name="id_destination" value="<?php echo $id_destination; ?>">
	<p>
	Doriti sa mutati categoria <?php echo Escape::html($c->title); ?> in categoria <?php echo Escape::html($dest->title); ?>?
	<br>
	<input type="submit" value="Ok" class="button">
	<input type="button" value="Cancel" onclick="redirect('admin/category.php?id_category=<?php echo intval($c->id); ?>'); " class="button">
	</p>
	</form>
</dd>
Return current item: Katyshop