示例#1
0
function PageContent()
{
    ?>
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Color';
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Color</p>
                    <!--
                    <a href="category_admin.php" class="button_link"><button class="">Add New Color</button></a>
                    -->
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Overview Text</th>
                            <th>Images</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objColor = new Color();
    $oColor = $objColor->GetAllColorByCategoryId($_REQUEST['cat']);
    $objColorImage = new ColorImage();
    foreach ($oColor as $color) {
        echo '<tr id="img_' . $color->Id . '">' . PHP_EOL;
        echo '<td>' . $color->Id . '</td>' . PHP_EOL;
        echo '<td>' . substr($color->OverviewText, 0, 200) . '</td>' . PHP_EOL;
        echo '<td>(<a href="colorimage_list.php?cat=' . $_REQUEST['cat'] . '&color=' . $color->Id . '">' . $objColorImage->getCountColorImageByColorId($color->Id) . '</a>)</td>' . PHP_EOL;
        echo '<td class="mid"><a href="color_admin.php?cat=' . $_REQUEST['cat'] . '&id=' . $color->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Settings';
    $aLinks[1] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Settings</p>
                    <a href="setting_admin.php" class="button_link"><button class="">Add New Setting</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Setting Name</th>
                            <th>Setting Value</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $db = new GenericDb();
    $rows = $db->run("select * from setting");
    foreach ($rows as $setting) {
        echo '<tr>' . PHP_EOL;
        echo '<td>' . $setting['id'] . '</td>' . PHP_EOL;
        echo '<td>' . $setting['setting_name'] . '</td>' . PHP_EOL;
        echo '<td>' . substr(strip_tags($setting['setting_value']), 0, 50) . '...</td>' . PHP_EOL;
        echo '<td class="mid"><a href="setting_admin.php?id=' . $setting['id'] . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="setting_delete.php?id=' . $setting['id'] . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $is_active;
    global $homepage_image_url;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Home Page Image Add';
    } else {
        $bread_image_name = 'Home Page Image Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Home Page Images';
    $aLinks[1] = 'homepageimage_list.php';
    $aLabels[2] = $bread_image_name;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="homepageimage_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="homepage_image_url" id="homepage_image_url" value="<?php 
    echo htmlspecialchars($homepage_image_url);
    ?>
"/>
                    		    <?php 
    if ($homepage_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $homepage_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Is Active?: </td>
                    		<td>
                    		    <input type="checkbox" <?php 
    if ($is_active == '1') {
        echo 'checked';
    }
    ?>
 name="is_active" value="1" />
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Home Page Image">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $objTechnology;
    global $objTechnologyInfo;
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'technologyinfoimage_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Technology';
    $aLinks[2] = 'technology_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = $objTechnology->TechnologyName;
    $aLinks[3] = 'technologyinfo_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'];
    $aLabels[4] = 'Technology Info Images';
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $objTechnology->TechnologyName;
    ?>
</p>
                    <a href="technologyinfoimage_admin.php?cat=<?php 
    echo $_REQUEST['cat'];
    ?>
&tech=<?php 
    echo $_REQUEST['tech'];
    ?>
&techinfo=<?php 
    echo $_REQUEST['techinfo'];
    ?>
" class="button_link"><button class="">Add New Technology Info Image</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Image</th>
                            <th>Ordering</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objTechnologyInfoImage = new TechnologyInfoImage();
    $oTechnologyInfoImage = $objTechnologyInfoImage->getAllTechnologyInfoImageByTechnologyInfoId($_REQUEST['techinfo']);
    foreach ($oTechnologyInfoImage as $techinfoimage) {
        echo '<tr id="img_' . $techinfoimage->Id . '">' . PHP_EOL;
        echo '<td>' . $techinfoimage->Id . '</td>' . PHP_EOL;
        echo '<td>';
        if ($techinfoimage->TechnologyInfoImageUrl != '') {
            echo substr($techinfoimage->TechnologyInfoImageUrl, 0, 200);
        }
        echo '</td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="technologyinfoimage_admin.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'] . '&techinfo=' . $_REQUEST['techinfo'] . '&id=' . $techinfoimage->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="technologyinfoimage_delete.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'] . '&techinfo=' . $_REQUEST['techinfo'] . '&id=' . $techinfoimage->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $item_id;
    global $item_image_side;
    global $item_image_url;
    global $path;
    global $aDropFields;
    global $aDropFieldTypes;
    $item = new Item($item_id);
    $category = new Category($item->CategoryId);
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Item Image Add';
    } else {
        $bread_image_name = 'Item Image Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Images';
    $aLinks[3] = 'itemimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'];
    $aLabels[4] = $bread_image_name;
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="itemimage_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
					    <?php 
    if ($item_image_url != '') {
        ?>
    						<tr>
    							<td>&nbsp;</td>
    							<td>
    							    <img src="/<?php 
        echo $path . $item_image_url;
        ?>
" style="width:120px;">
    							</td>
    						</tr>
    						<?php 
    }
    ?>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file" id="image_file" value="<?php 
    echo htmlspecialchars($item_image_url);
    ?>
"/>
                    		    <?php 
    if ($item_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $item_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right">Side: </td>
							<td>
							    <select name="item_image_side" class="form">
							        <option value=""></option>
							        <option value="Front"<?php 
    if ($item_image_side == 'Front') {
        echo ' selected';
    }
    ?>
>Front</option>
							        <option value="Left"<?php 
    if ($item_image_side == 'Left') {
        echo ' selected';
    }
    ?>
>Left</option>
							        <option value="Right"<?php 
    if ($item_image_side == 'Right') {
        echo ' selected';
    }
    ?>
>Right</option>
							        <option value="Back"<?php 
    if ($item_image_side == 'Back') {
        echo ' selected';
    }
    ?>
>Back</option>
							        <option value="Open"<?php 
    if ($item_image_side == 'Open') {
        echo ' selected';
    }
    ?>
>Open</option>
							    </select>
							</td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Item Image">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                   	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                   	<input type="hidden" name="item" value="<?php 
    echo $_REQUEST['item'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $partner_name;
    global $link_url;
    global $image_file;
    global $id;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_title = 'Featured Partner Add';
    } else {
        $bread_title = 'Featured Partner Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Featured Partner';
    $aLinks[1] = 'featuredpartner_list.php';
    $aLabels[2] = $bread_title;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger botspace heading"><?php 
    echo $bread_title;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" action="featuredpartner_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Partner Name: </td>
							<td><input class="form midform" type="text" name="partner_name" value="<?php 
    echo $partner_name;
    ?>
" placeholder="Partner Name"></td>
						</tr>
						<tr>
							<td class="table-label" align="right">URL: </td>
							<td><input class="form midform" type="text" name="link_url" value="<?php 
    echo $link_url;
    ?>
" placeholder="URL"></td>
						</tr>
                    	<tr>
                    		<td class="table-label" valign="top" align="right"><strong>Image File: </strong></td>
                    		<td class="field"><input type="file" class="slick" size="50" maxlength="200" name="image_file" id="image_file" value="<?php 
    echo htmlspecialchars($image_file);
    ?>
"/> <em>(Should be 56 pixels high)</em>
                    		    <?php 
    if ($image_file != '') {
        echo '<br /><br /><strong>Current File:</strong> ' . $image_file;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Featured Partner">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $objLightTest;
    global $objLight;
    global $id;
    ?>

            <div class="layout laymidwidth">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Light List';
    $aLinks[2] = 'light_list.php';
    $aLabels[3] = 'Light Tests';
    $aLinks[3] = 'lighttest_list.php?cat=' . $_REQUEST['cat'] . '&light=' . $_REQUEST['light'];
    $aLabels[4] = 'Delete Light Test';
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <p class="larger botspace heading">Light Test Delete</p>

                <script type="text/javascript">
                    $(document).ready(function() {
                        //$('#delete-form').submit(function() {
                        $('#submit').click(function() {
                            if (confirm("Are you sure?")) {
                                return true;
                            }
                            else {
                                return false;
                            }
                        });
                        $('#cancel').click(function() {
                            return true;
                        });
                    });
                </script>
                
                <div class="formstyle">
                    <form method="post" action="lighttest_delete.php" id="delete-form">
                        <p>Are you sure you want to delete this light test? This is irreversible.</p>
                        <p>&nbsp;</p>
                	    <table>
                	        <tr>
                	            <td><strong>Image: </strong></td>
                	            <td style="width: 20px;">&nbsp;</td>
                	            <td><img src="/<?php 
    echo $objLightTest->GetPath() . $objLightTest->ImageFileDark;
    ?>
" style="max-width: 200px;" /></td>
                	        </tr>
                	    </table>
                        <p>&nbsp;</p>
                      	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                      	<input type="hidden" name="cat" value="<?php 
    echo $cat;
    ?>
" />
                      	<input type="hidden" name="light" value="<?php 
    echo $light;
    ?>
" />

                        <p class="submit"><input type="submit" name="commit" id="submit" value="Delete Light Test">&nbsp;&nbsp;<input type="submit" id="cancel" name="commit" value="Cancel"></p>

                    </form>
                </div>

            </div>

<?php 
}
function PageContent()
{
    global $objLight;
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'lighttest_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Light';
    $aLinks[2] = 'light_list.php&cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Light Test List';
    $aList[3] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Light Tests</p>
                    <a href="lighttest_admin.php?cat=<?php 
    echo $_REQUEST['cat'];
    ?>
&light=<?php 
    echo $objLight->Id;
    ?>
" class="button_link"><button class="">Add New Light Test</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <td>Test Image</th>
                            <th>Dark Image</th>
                            <th>Light Image</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objLightTest = new LightTest();
    $oLightTest = $objLightTest->getAllLightTestByLightId($objLight->Id);
    foreach ($oLightTest as $lighttest) {
        echo '<tr id="img_' . $lighttest->Id . '">' . PHP_EOL;
        echo '<td>' . $lighttest->Id . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $objLightTest->GetPath() . $lighttest->BackgroundImageFile . '" style="max-width: 100px;" /></td>' . PHP_EOL;
        echo '<td><img src="/' . $objLightTest->GetPath() . $lighttest->ImageFileDark . '" style="max-width: 200px;" /></td>' . PHP_EOL;
        echo '<td><img src="/' . $objLightTest->GetPath() . $lighttest->ImageFileLight . '" style="max-width: 200px;" /></td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="lighttest_admin.php?cat=' . $_REQUEST['cat'] . '&light=' . $_REQUEST['light'] . '&id=' . $lighttest->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="lighttest_delete.php?cat=' . $_REQUEST['cat'] . '&light=' . $_REQUEST['light'] . '&id=' . $lighttest->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    $item = new Item($_REQUEST['item']);
    $category = new Category($item->CategoryId);
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'itemimage_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $category->CategoryName;
    $aLinks[1] = 'item_list.php?cat=' . $category->Id;
    $aLabels[2] = $item->ItemName;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

<!-- 
                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $item->ItemName;
    ?>
 Images</p>
                    <a href="itemimage_admin.php?item=<?php 
    echo $_REQUEST['item'];
    ?>
" class="button_link"><button class="">Add New Item Image</button></a>
                </div>
 -->
            </div>
    
            <div class="layout">
    
                <table class="tablestyle">
                    <thead>
                        <tr>
                            <th colspan="2">Item Settings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="item_admin.php?id=<?php 
    echo $item->Id;
    ?>
"><img src="img/edit-icon.png" /></a></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>Item Name:</td>
                            <td><?php 
    echo $item->ItemName;
    ?>
</td>
                        </tr>
                        <tr>
                            <td>Background Color:</td>
                            <td><?php 
    echo $item->BackgroundColor;
    ?>
</td>
                        </tr>
                        <tr>
                            <td>Contact Email:</td>
                            <td><?php 
    echo $item->ContactEmail;
    ?>
</td>
                        </tr>
                    </tbody>
                </table>
                    
            </div> <!-- layout -->

			<div class="all-section-separator"></div>
			
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                    	<tr>
                    		<th colspan="5">Item Images</th>
                    	</tr>
                    </thead>
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Side</th>
                            <th>Image</th>
                            <th>Hotspots</th>
<!-- 
                            <th class="mid">Order</th>
 -->
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemImage = new ItemImage();
    $objItemImageHighlight = new ItemImageHighlight();
    $oItemImage = $objItemImage->getAllItemImageByItemId($_REQUEST['item']);
    foreach ($oItemImage as $itemimage) {
        echo '<tr id="img_' . $itemimage->Id . '">' . PHP_EOL;
        echo '<td>' . $itemimage->Id . '</td>' . PHP_EOL;
        echo '<td>' . $itemimage->ItemImageSide . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $itemimage->GetPath() . $itemimage->ItemImageUrl . '" style="width:80px;"></td>' . PHP_EOL;
        echo '<td>';
        $hcount = $objItemImageHighlight->getCountItemImageHighlightByItemImageId($itemimage->Id);
        //echo '<a href="itemimagehotspot.php?img=' . $itemimage->Id . '">' . $hcount . ' Hotspots</a>';
        // note: above hotspot admin would be pretty complicated from a user perspective (x, y, dimensions, image).
        //       therefore, not implementing now. - Jay
        echo $hcount . ' Hotspots</a>';
        echo '</td>' . PHP_EOL;
        //                             echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="itemimage_admin.php?id=' . $itemimage->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="itemimage_delete.php?id=' . $itemimage->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->

			<div class="all-section-separator"></div>

            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                    	<tr>
                    		<th colspan="4">Item Infos</th>
                    	</tr>
                    </thead>
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Category</th>
                            <th>Text</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemInfo = new ItemInfo();
    $objItemInfoType = new ItemInfoType();
    $item_info_types = $objItemInfoType->GetAllItemInfoType();
    $objItemInfoImage = new ItemInfoImage();
    foreach ($item_info_types as $type) {
        $oItemInfo = $objItemInfo->GetAllItemInfoByItemIdItemInfoTypeId($_REQUEST['item'], $type->Id);
        $item_info = $oItemInfo[0];
        echo '<tr>' . PHP_EOL;
        echo '<td>' . $item_info->Id . '</td>' . PHP_EOL;
        echo '<td>' . $type->ItemInfoTypeName . '</td>' . PHP_EOL;
        echo '<td>' . strip_tags($item_info->ItemInfo) . '</td>' . PHP_EOL;
        echo '<td class="mid"><a href="iteminfotype_admin.php?id=' . $item_info->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="iteminfotype_delete.php?id=' . $item_info->Id . '"><img src="img/delete-icon.png" /></a> (not working)</td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->

			<div class="all-section-separator"></div>

            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                    	<tr>
                    		<th colspan="4">Item Info Images</th>
                    	</tr>
                    </thead>
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Image</th>
                            <th>&nbsp;</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemInfoImage = new ItemInfoImage();
    $oItemInfoImage = $objItemInfoImage->GetAllItemInfoImageByItemId($_REQUEST['item']);
    foreach ($oItemInfoImage as $image) {
        echo '<tr>' . PHP_EOL;
        echo '<td>' . $image->Id . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $image->GetPath() . $image->ItemInfoImageUrl . '" style="height:60px;"></td>' . PHP_EOL;
        echo '<td>' . '&nbsp;' . '</td>' . PHP_EOL;
        echo '<td class="mid"><a href="iteminfoimage_admin.php?id=' . $image->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="iteminfoimage_delete.php?id=' . $image->Id . '"><img src="img/delete-icon.png" /></a> (not working)</td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
            			
			<div class="all-section-separator"></div>

            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                    	<tr>
                    		<th colspan="5">Item Videos</th>
                    	</tr>
                    </thead>
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Title</th>
                            <th>URL</th>
                            <th>Image</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemVideo = new ItemVideo();
    $oItemVideo = $objItemVideo->GetAllItemVideoByItemId($_REQUEST['item']);
    foreach ($oItemVideo as $video) {
        echo '<tr>' . PHP_EOL;
        echo '<td>' . $video->Id . '</td>' . PHP_EOL;
        echo '<td>' . $video->ItemVideoTitle . '</td>' . PHP_EOL;
        echo '<td>' . $video->ItemVideoUrl . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $video->GetPath() . $video->ItemVideoPlaceholderImageUrl . '" style="height:60px;"></td>' . PHP_EOL;
        echo '<td class="mid"><a href="itemvideo_admin.php?id=' . $video->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="itemvideo_delete.php?id=' . $video->Id . '"><img src="img/delete-icon.png" /></a> (not working)</td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
						
			<div class="all-section-separator"></div>

<?php 
    // this section disabled because added item_gallery table.
    ?>
<!-- 
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                    	<tr>
                    		<th colspan="4">Item Gallery Images</th>
                    	</tr>
                    </thead>
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Description</th>
                            <th>Image</th> 
                            <th class="mid">Order (comment out)</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemGalleryImage = new ItemGalleryImage();
    $oItemGalleryImage = $objItemGalleryImage->getAllItemGalleryImageByItemId($_REQUEST['item']);
    foreach ($oItemGalleryImage as $image) {
        echo '<tr id="img_' . $image->Id . '">' . PHP_EOL;
        echo '<td>' . $image->ItemGalleryImageDescription . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $image->GetPath() . $image->ItemGalleryImageUrl . '" style="width:80px;"></td>' . PHP_EOL;
        //                             echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="itemgalleryimage_admin.php?id=' . $image->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="itemgalleryimage_delete.php?id=' . $image->Id . '"><img src="img/delete-icon.png" /></a> (not working)</td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!~~ layout ~~>
 -->
			
			<p>Presentations:</p>

<?php 
}
示例#10
0
function PageContent()
{
    global $title;
    global $summary;
    global $image_file;
    global $video_embed;
    global $id;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

	<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
	    selector : "textarea.mceEditor",
	    plugins : "image code pagebreak table spellchecker preview searchreplace print contextmenu paste fullscreen nonbreaking",
	    image_advtab : true,
	    forced_root_block : "",
	    setup: function (editor) {
	        editor.on('init', function(args) {
	            editor = args.target;
	
	            editor.on('NodeChange', function(e) {
	                if (e && e.element.nodeName.toLowerCase() == 'img') {
	//                     width = e.element.width;
	//                     height = e.element.height;
	                    tinyMCE.DOM.setAttribs(e.element, {'class':'img_responsive', 'height' : null, 'width' : null});
	                    tinyMCE.DOM.setStyle(e.element, 'max-width', '100%');
	                }
	            });
	        });
	    },
		content_css : ["../css/bootstrip.min.css"],
	    document_base_url : "http://havells.boxkitemedia.com"
	});
	</script>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_title = 'Video Add';
    } else {
        $bread_title = 'Video Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Videos';
    $aLinks[1] = 'video_list.php';
    $aLabels[2] = $bread_title;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger botspace heading"><?php 
    echo $bread_title;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" action="video_admin.php">
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Title: </td>
							<td><input class="form midform" type="text" name="title" value="<?php 
    echo $title;
    ?>
" placeholder="Title"></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Summary: </td>
							<td><textarea class="form midform mceEditor" name="summary" placeholder="Summary"><?php 
    echo $summary;
    ?>
</textarea></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file" id="image_file" value="<?php 
    echo htmlspecialchars($image_file);
    ?>
"/>
                    		    <?php 
    if ($image_file != '') {
        echo '<br ><strong>Current File:</strong> ' . $image_file;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right" style="vertical-align: top;">Video Code: </td>
							<td><textarea class="form midform mceNoEditor" name="video_embed" style="height: 200px;" placeholder="Video Code"><?php 
    echo $video_embed;
    ?>
</textarea></td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Video">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $id;
    global $title;
    global $pdf_file;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_title = 'Information Add';
    } else {
        $bread_title = 'Information Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Information';
    $aLinks[1] = 'information_list.php';
    $aLabels[2] = $bread_title;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_title;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="information_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Title: </td>
							<td><input class="form midform" type="text" name="title" value="<?php 
    echo $title;
    ?>
" placeholder="Title" /></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">PDF File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="pdf_file" id="pdf_file" value="<?php 
    echo htmlspecialchars($pdf_file);
    ?>
"/>
                    		    <?php 
    if ($pdf_file != '') {
        echo '<br ><strong>Current File:</strong> ' . $pdf_file;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Information">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $objCategory;
    ?>
            <div class="layout center-flex">
                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php?';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Images';
    $aLinks[3] = 'itemimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'];
    $aLabels[4] = 'Item Highlights';
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $objCategory->CategoryName;
    ?>
</p>
                    <a href="itemimagehighlight_admin.php?cat=<?php 
    echo $objCategory->Id;
    ?>
&item=<?php 
    echo $_REQUEST['item'];
    ?>
&itemimage=<?php 
    echo $_REQUEST['itemimage'];
    ?>
" class="button_link"><button class="">Add New Item Image Highlight</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Image</th>
                            <th>Left</th>
                            <th>Top</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemImage = new ItemImage($_REQUEST['item']);
    $objItemImageHighlight = new ItemImageHighlight();
    $oItemImageHighlight = $objItemImageHighlight->getAllItemImageHighlightByItemImageId($_REQUEST['itemimage']);
    foreach ($oItemImageHighlight as $itemimagehighlight) {
        echo '<tr id="img_' . $itemimagehighlight->Id . '">' . PHP_EOL;
        echo '<td>' . $itemimagehighlight->Id . '</td>' . PHP_EOL;
        echo '<td>';
        if ($objItemImage->ItemImageUrl != '') {
            echo '<img src="/' . $objItemImage->GetPath() . $objItemImage->ItemImageUrl . '" style="width:80px;">';
        }
        echo '</td>' . PHP_EOL;
        echo '<td>' . $itemimagehighlight->HotspotLeft . '</td>' . PHP_EOL;
        echo '<td>' . $itemimagehighlight->HotspotTop . '</td>' . PHP_EOL;
        echo '<td class="mid"><a href="itemimagehighlight_admin.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'] . '&itemimage=' . $_REQUEST['itemimage'] . '&id=' . $itemimagehighlight->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="itemimagehighlight_delete.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'] . '&itemimage=' . $_REQUEST['itemimage'] . '&id=' . $itemimagehighlight->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $item_id;
    global $technology_info_image_url;
    global $aDropFields;
    global $aDropFieldTypes;
    $objTechnology = new Technology($_REQUEST['tech']);
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Technology Info Image Add';
    } else {
        $bread_image_name = 'Technology Info Image Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Technology';
    $aLinks[2] = 'technology_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = $objTechnology->TechnologyName;
    $aLinks[3] = 'technologyinfo_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'];
    $aLabels[4] = 'Technology Info Images';
    $aLinks[4] = 'technologyinfoimage_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'] . '&techimage=' . $_REQUEST['techimage'];
    $aLabels[5] = $bread_image_name;
    $aLinks[5] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="technologyinfoimage_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="technology_info_image_url" id="technology_info_image_url" value="<?php 
    echo htmlspecialchars($technology_info_image_url);
    ?>
"/>
                    		    <?php 
    if ($technology_info_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $technology_info_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Technology Info Image">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                  	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                   	<input type="hidden" name="tech" value="<?php 
    echo $_REQUEST['tech'];
    ?>
" />
                   	<input type="hidden" name="techinfo" value="<?php 
    echo $_REQUEST['techinfo'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
示例#14
0
function PageContent()
{
    global $objCategory;
    ?>
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php?';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Info List';
    $aLinks[3] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $objCategory->CategoryName;
    ?>
</p>
                    <!-- a href="itemimage_admin.php?cat=<?php 
    echo $objCategory->Id;
    ?>
&item=<?php 
    echo $_REQUEST['item'];
    ?>
" class="button_link"><button class="">Add New Item Image</button></a -->
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Type</th>
                            <th>Text</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemInfoType = new ItemInfoType();
    $oItemInfoType = $objItemInfoType->getAllItemInfoType('item_info_type_name');
    foreach ($oItemInfoType as $iteminfotype) {
        $objItemInfo = new ItemInfo();
        $oItemInfo = $objItemInfo->getAllItemInfoByItemIdItemInfoTypeId($_REQUEST['item'], $iteminfotype->Id);
        echo '<tr id="img_' . $oItemInfo[0]->Id . '">' . PHP_EOL;
        echo '<td>' . $oItemInfo[0]->Id . '</td>' . PHP_EOL;
        echo '<td>' . $iteminfotype->ItemInfoTypeName . '</td>' . PHP_EOL;
        echo '<td>';
        if ($oItemInfo[0]->ItemInfo != '') {
            echo substr($oItemInfo[0]->ItemInfo, 0, 200);
        }
        echo '</td>' . PHP_EOL;
        echo '<td class="mid"><a href="iteminfo_admin.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'] . '&infoid=' . $iteminfotype->Id . '&type=' . $iteminfotype->Id . '&id=' . $oItemInfo[0]->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $light_id;
    global $dark_text;
    global $light_text;
    global $rgba_value;
    global $rgba_value_right;
    global $image_file_dark;
    global $image_file_light;
    global $background_image_file;
    global $path;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Light Test Add';
    } else {
        $bread_image_name = 'Light Test Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Light List';
    $aLinks[2] = 'light_list.php';
    $aLabels[3] = 'Light Tests';
    $aLinks[3] = 'lighttest_list.php?cat=' . $_REQUEST['cat'] . '&light=' . $_REQUEST['light'];
    $aLabels[4] = $bread_image_name;
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="lighttest_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Dark Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_dark" id="image_file_dark" value="<?php 
    echo htmlspecialchars($image_file_dark);
    ?>
"/>
                    		    <?php 
    if ($image_file_dark != '') {
        echo '<br ><strong>Current File:</strong> ' . $image_file_dark;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right">Dark Image Text: </td>
							<td><input class="form midform" type="text" name="dark_text" style="width: 90%;" value="<?php 
    echo $dark_text;
    ?>
" placeholder="Dark Image Text" /></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Light Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_light" id="image_file_light" value="<?php 
    echo htmlspecialchars($image_file_light);
    ?>
"/>
                    		    <?php 
    if ($image_file_light != '') {
        echo '<br ><strong>Current File:</strong> ' . $image_file_light;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[1]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right">Light Image Text: </td>
							<td><input class="form midform" type="text" name="light_text" style="width: 90%;" value="<?php 
    echo $light_text;
    ?>
" placeholder="Light Image Text" /></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Test Image: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="background_image_file" id="background_image_file" value="<?php 
    echo htmlspecialchars($background_image_file);
    ?>
"/>
                    		    <?php 
    if ($background_image_file != '') {
        echo '<br ><strong>Current File:</strong> ' . $background_image_file;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[2]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right">RGBA Value (Left): </td>
							<td><input class="form midform" type="text" name="rgba_value" style="width: 90%;" value="<?php 
    echo $rgba_value;
    ?>
" placeholder="RGBA Value (Left)" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">RGBA Value (Right): </td>
							<td><input class="form midform" type="text" name="rgba_value_right" style="width: 90%;" value="<?php 
    echo $rgba_value_right;
    ?>
" placeholder="RGBA Value (Right)" /></td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Light Test">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                  	<input type="hidden" name="cat" value="<?php 
    echo $cat;
    ?>
" />
                   	<input type="hidden" name="light" value="<?php 
    echo $_REQUEST['light'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $customer_name;
    global $customer_title;
    global $customer_company;
    global $testimonial_text;
    global $id;
    ?>

	<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
	    selector : "textarea.mceEditor",
	    plugins : "image code pagebreak table spellchecker preview searchreplace print contextmenu paste fullscreen nonbreaking",
	    image_advtab : true,
	    forced_root_block : "",
	    setup: function (editor) {
	        editor.on('init', function(args) {
	            editor = args.target;
	
	            editor.on('NodeChange', function(e) {
	                if (e && e.element.nodeName.toLowerCase() == 'img') {
	//                     width = e.element.width;
	//                     height = e.element.height;
	                    tinyMCE.DOM.setAttribs(e.element, {'class':'img_responsive', 'height' : null, 'width' : null});
	                    tinyMCE.DOM.setStyle(e.element, 'max-width', '100%');
	                }
	            });
	        });
	    },
		content_css : ["../css/bootstrip.min.css"],
	    document_base_url : "http://havells.boxkitemedia.com"
	});
	</script>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_title = 'Testimonial Add';
    } else {
        $bread_title = 'Testimonial Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Testimonials';
    $aLinks[1] = 'testimonial_list.php';
    $aLabels[2] = $bread_title;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger botspace heading"><?php 
    echo $bread_title;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" action="testimonial_admin.php">
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Customer Name: </td>
							<td><input class="form midform" type="text" name="customer_name" value="<?php 
    echo $customer_name;
    ?>
" placeholder="Customer Name"></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Customer Title: </td>
							<td><input class="form midform" type="text" name="customer_title" value="<?php 
    echo $customer_title;
    ?>
" placeholder="Customer Title"></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Customer Company: </td>
							<td><input class="form midform" type="text" name="customer_company" value="<?php 
    echo $customer_company;
    ?>
" placeholder="Customer Company"></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Testimonial: </td>
							<td><textarea class="form midform mceEditor" name="testimonial_text" placeholder="Testimonial"><?php 
    echo $testimonial_text;
    ?>
</textarea></td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Testimonial">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
}
示例#17
0
function PageContent()
{
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'category_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
                
                $('.chk-active').click(function() {
                    var item_id = $(this).attr('id');
                    var category_id = $(this).attr('data-id');
                    var item_value = 0;
                    if ($(this).prop("checked")) {
                        item_value = 1;
                    }
                    $.ajax({
                        url: 'technology_activate.php',
                        data: {
                            category_id: category_id,
                            item_value: item_value,
                            item_id: item_id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                });
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Categories';
    $aLinks[1] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Categories</p>
                    <a href="category_admin.php" class="button_link"><button class="">Add New Category</button></a>
                </div>
            </div>
    
            <div class="layout">
                
                <p>Use checkboxes to mark sections active or inactive</p>
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Category Name</th>
                            <th>Items</th>
                            <!--
                            <th>Color</th>
                            <th>iBeacon</th>
                            <th>Light</th>
                            <th>Sound</th>
                            -->
                            <th>Patents</th>
                            <th>Technology</th>
                            <th>Active</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objTechnology = new Technology();
    $objCategory = new Category();
    $oCategory = $objCategory->GetAllCategory('sort_order');
    $objItem = new Item();
    foreach ($oCategory as $cat) {
        echo '<tr id="img_' . $cat->Id . '">' . PHP_EOL;
        echo '<td>' . $cat->Id . '</td>' . PHP_EOL;
        echo '<td>' . $cat->CategoryName . '</td>' . PHP_EOL;
        echo '<td>(<a href="item_list.php?cat=' . $cat->Id . '">' . $objItem->getCountItemByCategoryId($cat->Id) . '</a>)</td>' . PHP_EOL;
        //$cChecked = '';
        //if ($objTechnology->getAllTechnologyByCategoryIdLinkUrlIsActive($cat->Id, 'tech-color.php')) {
        //    $cChecked = 'checked';
        //}
        //echo '<td class="mid"><input type="checkbox" ' . $cChecked . ' data-id="' . $cat->Id . '" class="chk-active" name="color-chk" id="color-chk" value="1" />&nbsp;<a href="color_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        //$cChecked = '';
        //if ($objTechnology->getAllTechnologyByCategoryIdLinkUrlIsActive($cat->Id, 'tech-ibeacon.php')) {
        //    $cChecked = 'checked';
        //}
        //echo '<td class="mid"><input type="checkbox" ' . $cChecked . ' data-id="' . $cat->Id . '" class="chk-active" name="ibeacon-chk" id="ibeacon-chk" value="1" />&nbsp;<a href="ibeacon_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        //$cChecked = '';
        //if ($objTechnology->getAllTechnologyByCategoryIdLinkUrlIsActive($cat->Id, 'tech-light.php')) {
        //    $cChecked = 'checked';
        //}
        //echo '<td class="mid"><input type="checkbox" ' . $cChecked . ' data-id="' . $cat->Id . '" class="chk-active" name="light-chk" id="light-chk" value="1" />&nbsp;<a href="light_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        //$cChecked = '';
        //if ($objTechnology->getAllTechnologyByCategoryIdLinkUrlIsActive($cat->Id, 'tech-sound.php')) {
        //    $cChecked = 'checked';
        //}
        //echo '<td class="mid"><input type="checkbox" ' . $cChecked . ' data-id="' . $cat->Id . '" class="chk-active" name="sound-chk" id="sound-chk" value="1" />&nbsp;<a href="sound_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        echo '<td class="mid"><a href="patent_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        echo '<td class="mid"><a href="technology_list.php?cat=' . $cat->Id . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
        echo '<td>';
        if ($cat->IsActive) {
            echo 'Yes';
        } else {
            echo 'No';
        }
        echo '</td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="category_admin.php?id=' . $cat->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="category_delete.php?id=' . $cat->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $category_name;
    global $category_description;
    global $background_color;
    global $category_image_url;
    global $explore_all_image_url;
    global $explore_all_active_image_url;
    global $technology_image_url;
    global $technology_active_image_url;
    global $title_heading;
    global $subtitle_heading;
    global $contact_email;
    global $is_active;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
	    selector : "textarea.mceEditor",
	    plugins : "image code pagebreak table spellchecker preview searchreplace print contextmenu paste fullscreen nonbreaking",
	    image_advtab : true,
	    forced_root_block : "",
	    setup: function (editor) {
	        editor.on('init', function(args) {
	            editor = args.target;
	
	            editor.on('NodeChange', function(e) {
	                if (e && e.element.nodeName.toLowerCase() == 'img') {
	//                     width = e.element.width;
	//                     height = e.element.height;
	                    tinyMCE.DOM.setAttribs(e.element, {'class':'img_responsive', 'height' : null, 'width' : null});
	                    tinyMCE.DOM.setStyle(e.element, 'max-width', '100%');
	                }
	            });
	        });
	    },
		content_css : ["../css/bootstrip.min.css"],
	    //document_base_url : "http://havells.boxkitemedia.com"
	});
	</script>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Category Add';
    } else {
        $bread_image_name = 'Category Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Categories';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = $bread_image_name;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="category_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Category Name: </td>
							<td><input class="form midform" type="text" name="category_name" value="<?php 
    echo $category_name;
    ?>
" placeholder="Category Name" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Title Heading: </td>
							<td><input class="form midform" type="text" name="title_heading" value="<?php 
    echo $title_heading;
    ?>
" placeholder="Title Heading" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Subtitle Heading: </td>
							<td><input class="form midform" type="text" name="subtitle_heading" value="<?php 
    echo $subtitle_heading;
    ?>
" placeholder="Subtitle Heading" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Contact Email: </td>
							<td><input class="form midform" type="text" name="contact_email" value="<?php 
    echo $contact_email;
    ?>
" placeholder="Contact Email" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Category Description: </td>
							<td><textarea class="form midform mceEditor" name="category_description" placeholder="Category Description"><?php 
    echo $category_description;
    ?>
</textarea></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Background Color: </td>
							<td><input class="form midform" type="text" name="background_color" value="<?php 
    echo $background_color;
    ?>
" placeholder="Background Color" /> Examples: "#F40000", "rgb(255,255,0)"</td>
						</tr>
						<tr>
							<td class="table-label" align="right">Category Image: </td>
							<td><input class="form midform" type="text" name="category_image_url" value="<?php 
    echo $category_image_url;
    ?>
" placeholder="Image File" /></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file" id="image_file" value="<?php 
    echo htmlspecialchars($category_image_url);
    ?>
"/>
                    		    <?php 
    if ($category_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $category_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Explore All Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_exall" id="image_file_exall" value="<?php 
    echo htmlspecialchars($explore_all_image_url);
    ?>
"/>
                    		    <?php 
    if ($explore_all_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $explore_all_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[1]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Explore All Active Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_exall_active" id="image_file_exall_active" value="<?php 
    echo htmlspecialchars($explore_all_active_image_url);
    ?>
"/>
                    		    <?php 
    if ($explore_all_active_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $explore_all_active_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[2]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Technology Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_tech" id="image_file_tech" value="<?php 
    echo htmlspecialchars($technology_image_url);
    ?>
"/>
                    		    <?php 
    if ($technology_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $technology_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[3]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Technology Active Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file_tech_active" id="image_file_tech_active" value="<?php 
    echo htmlspecialchars($technology_active_image_url);
    ?>
"/>
                    		    <?php 
    if ($technology_active_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $technology_active_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[4]);
    ?>
                    		</td>
                    	</tr>
						<tr>
							<td class="table-label" align="right">Is Active?: </td>
							<td><input type="checkbox" name="is_active" value="1"<?php 
    if ($is_active) {
        echo ' checked';
    }
    ?>
>
							</td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Category">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
示例#19
0
function PageContent()
{
    global $id;
    global $first_name;
    global $last_name;
    global $email_address;
    global $password;
    global $is_admin;
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_title = 'User Add';
    } else {
        $bread_title = 'User Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Users';
    $aLinks[1] = 'user_list.php';
    $aLabels[2] = $bread_title;
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_title;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" action="user_admin.php">
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">First Name: </td>
							<td><input class="form midform" type="text" name="first_name" value="<?php 
    echo $first_name;
    ?>
" placeholder="First Name" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Last Name: </td>
							<td><input class="form midform" type="text" name="last_name" value="<?php 
    echo $last_name;
    ?>
" placeholder="Last Name" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Email Address: </td>
							<td><input class="form midform" type="text" name="email_address" value="<?php 
    echo $email_address;
    ?>
" placeholder="Email Address" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Admin: </td>
							<td><input type="checkbox" name="is_admin" value="1"<?php 
    if ($is_admin) {
        echo ' checked';
    }
    ?>
>
							</td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save User">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

				</form>
		</div>

	</div>

<?php 
}
示例#20
0
function PageContent()
{
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'page_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Site Pages';
    $aLinks[1] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Pages</p>
                    <a href="page_admin.php" class="button_link"><button class=" ">Add New Page</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th colspan='2'>Page Title</th>
                            <th>Is Menu</th>
                            <th>Friendly URL</th>
                            <th>Template</th>
                            <th>Published</th>
                            <!-- th>Sorting</th -->
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objPage = new Page();
    $oPage = $objPage->GetAllPage('parent_page_id, sort_order');
    foreach ($oPage as $page) {
        echo '<tr id="img_' . $page->Id . '">' . PHP_EOL;
        echo "<td>" . $page->Id . "</td>";
        if ($page->ParentPageId == '' || $page->ParentPageId == $page->Id) {
            echo "<td colspan='2'>" . $page->PageTitle . "</td>";
        } else {
            echo "<td style='width:20px;'>&nbsp;</td>";
            echo "<td>" . $page->PageTitle . "</td>";
        }
        echo "<td>";
        if ($page->IsMenu == 1) {
            echo 'Yes';
        } else {
            echo 'No';
        }
        echo "</td>";
        echo "<td>" . $page->FriendlyUrl . "</td>";
        echo "<td>";
        $objTemplate = new Template($page->TemplateId);
        echo $objTemplate->Name;
        echo "</td>";
        echo "<td>";
        if ($page->Published == 1) {
            echo 'Yes';
        } else {
            echo 'No';
        }
        echo "</td>";
        //echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="page_admin.php?id=' . $page->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="page_delete.php?id=' . $page->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $objCategory;
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'itemvideo_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php?';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Videos';
    $aLinks[3] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $objCategory->CategoryName;
    ?>
</p>
                    <a href="itemvideo_admin.php?cat=<?php 
    echo $objCategory->Id;
    ?>
&item=<?php 
    echo $_REQUEST['item'];
    ?>
" class="button_link"><button class="">Add New Item Video</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Title</th>
                            <th>Video File Name</th>
<!-- 
                            <th>Image</th>
 -->
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objItemVideo = new ItemVideo();
    $oItemVideo = $objItemVideo->getAllItemVideoByItemId($_REQUEST['item']);
    foreach ($oItemVideo as $itemvideo) {
        echo '<tr id="img_' . $itemvideo->Id . '">' . PHP_EOL;
        echo '<td>' . $itemvideo->Id . '</td>' . PHP_EOL;
        echo '<td>' . $itemvideo->ItemVideoTitle . '</td>' . PHP_EOL;
        echo '<td>';
        echo $itemvideo->ItemVideoUrl;
        echo '</td>' . PHP_EOL;
        //                             echo '<td>';
        //                             if ($itemvideo->ItemVideoPlaceholderImageUrl != '') {
        //                                 echo '<img src="/' . $itemvideo->GetPath() . $itemvideo->ItemVideoPlaceholderImageUrl . '" style="width:80px;">';
        //                             }
        //                             echo '</td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="itemvideo_admin.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'] . '&id=' . $itemvideo->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="itemvideo_delete.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'] . '&id=' . $itemvideo->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $item_info;
    global $type;
    $objCategory = new Category($_REQUEST['cat']);
    ?>

	<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
	    selector : "textarea.mceEditor",
	    plugins : "image code pagebreak table spellchecker preview searchreplace print contextmenu paste fullscreen nonbreaking",
	    image_advtab : true,
	    forced_root_block : "p",
	    setup: function (editor) {
	        editor.on('init', function(args) {
	            editor = args.target;
	
	            editor.on('NodeChange', function(e) {
	                if (e && e.element.nodeName.toLowerCase() == 'img') {
	//                     width = e.element.width;
	//                     height = e.element.height;
	                    tinyMCE.DOM.setAttribs(e.element, {'class':'img_responsive', 'height' : null, 'width' : null});
	                    tinyMCE.DOM.setStyle(e.element, 'max-width', '100%');
	                }
	            });
	        });
	    },
		content_css : ["../css/bootstrip.min.css"],
	    //document_base_url : "http://havells.boxkitemedia.com"
	});
	</script>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Item Info Add';
    } else {
        $bread_image_name = 'Item Info Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php?';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = $bread_image_name;
    $aLinks[3] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="iteminfo_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Item Info Text: </td>
							<td><textarea class="form midform mceEditor" name="item_info" placeholder="Item Info"><?php 
    echo $item_info;
    ?>
</textarea></td>
						</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Item Info">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                   	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                   	<input type="hidden" name="item" value="<?php 
    echo $_REQUEST['item'];
    ?>
" />
                   	<input type="hidden" name="item_info_type_id" value="<?php 
    echo $_REQUEST['type'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
}
function PageContent()
{
    global $objItemInfoImage;
    global $id;
    $item = new Item($objItemInfoImage->ItemId);
    $objCategory = new Category($item->CategoryId);
    ?>

            <div class="layout laymidwidth">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $objCategory->CategoryName;
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Info Images';
    $aLinks[3] = 'iteminfoimage_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'];
    $aLabels[4] = 'Item Info Image Delete';
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <p class="larger botspace heading">Item Info Image Delete</p>

                <script type="text/javascript">
                    $(document).ready(function() {
                        //$('#delete-form').submit(function() {
                        $('#submit').click(function() {
                            if (confirm("Are you sure?")) {
                                return true;
                            }
                            else {
                                return false;
                            }
                        });
                        $('#cancel').click(function() {
                            return true;
                        });
                    });
                </script>
                
                <div class="formstyle">
                    <form method="post" action="iteminfoimage_delete.php" id="delete-form">
                        <p>Are you sure you want to delete this item image? This is irreversible.</p>
                        <p>&nbsp;</p>
                	    <table>
                	        <tr>
                	            <td><strong>Item Info Image: </strong></td>
                	            <td style="width: 20px;">&nbsp;</td>
                	            <td><img src="/<?php 
    echo $objItemInfoImage->GetPath() . $objItemInfoImage->ItemInfoImageUrl;
    ?>
" style="width:200px;"></td>
                	        </tr>
                	    </table>
                        <p>&nbsp;</p>
                      	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                      	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                      	<input type="hidden" name="item" value="<?php 
    echo $_REQUEST['item'];
    ?>
" />

                        <p class="submit"><input type="submit" name="commit" id="submit" value="Delete Item Info Image">&nbsp;&nbsp;<input type="submit" id="cancel" name="commit" value="Cancel"></p>

                    </form>
                </div>

            </div>

<?php 
}
function PageContent()
{
    global $objTechnologyInfoImage;
    global $id;
    $objTechnology = new Technology($_REQUEST['tech']);
    ?>

            <div class="layout laymidwidth">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Technology';
    $aLinks[2] = 'technology_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = $objTechnology->TechnologyName;
    $aLinks[3] = 'technologyinfo_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'];
    $aLabels[4] = 'Technology Info Images';
    $aLinks[4] = 'technologyinfoimage_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $_REQUEST['tech'] . '&techimage=' . $_REQUEST['techimage'];
    $aLabels[5] = 'Technology Info Image Delete';
    $aLinks[5] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <p class="larger botspace heading">Technology Image Delete</p>

                <script type="text/javascript">
                    $(document).ready(function() {
                        //$('#delete-form').submit(function() {
                        $('#submit').click(function() {
                            if (confirm("Are you sure?")) {
                                return true;
                            }
                            else {
                                return false;
                            }
                        });
                        $('#cancel').click(function() {
                            return true;
                        });
                    });
                </script>
                
                <div class="formstyle">
                    <form method="post" action="technologyinfoimage_delete.php" id="delete-form">
                        <p>Are you sure you want to delete this technology info image? This is irreversible.</p>
                        <p>&nbsp;</p>
                	    <table>
							<tr>
								<td class="table-label" align="right">Technology Info Image:&nbsp;</td>
								<td><?php 
    echo $objTechnologyInfoImage->TechnologyInfoImageUrl;
    ?>
</td>
							</tr>
                	    </table>
                        <p>&nbsp;</p>
                      	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                      	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                      	<input type="hidden" name="tech" value="<?php 
    echo $_REQUEST['tech'];
    ?>
" />
                      	<input type="hidden" name="techinfo" value="<?php 
    echo $_REQUEST['techinfo'];
    ?>
" />

                        <p class="submit"><input type="submit" name="commit" id="submit" value="Delete Technology Info Image">&nbsp;&nbsp;<input type="submit" id="cancel" name="commit" value="Cancel"></p>

                    </form>
                </div>

            </div>

<?php 
}
function PageContent()
{
    $demonstration_item = new DemonstrationItem($_REQUEST['demoitem']);
    $demonstration_category = new DemonstrationCategory($demonstration_item->DemonstrationCategoryId);
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'demoitemimage_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $demonstration_category->DemonstrationCategoryName;
    $aLinks[1] = 'demoitem_list.php?cat=' . $demonstration_category->Id;
    $aLabels[2] = $demonstration_item->DemonstrationItemName . ' Images';
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading"><?php 
    echo $demonstration_item->DemonstrationItemName;
    ?>
 Images</p>
                    <a href="demoitemimage_admin.php?demoitem=<?php 
    echo $_REQUEST['demoitem'];
    ?>
" class="button_link"><button class="">Add New Item Image</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Side</th>
                            <th>Image</th>
                            <th>Hotspots</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objDemonstrationItemImage = new DemonstrationItemImage();
    $objDemonstrationItemImageHighlight = new DemonstrationItemImageHighlight();
    if (isset($_REQUEST['demoitem'])) {
        $oDemonstrationItemImage = $objDemonstrationItemImage->getAllDemonstrationItemImageByDemonstrationItemId($_REQUEST['demoitem']);
    } else {
        $oDemonstrationItemImage = $objDemonstrationItemImage->GetAllDemonstrationItemImage('sort_order');
    }
    foreach ($oDemonstrationItemImage as $demoitemimage) {
        echo '<tr id="img_' . $demoitemimage->Id . '">' . PHP_EOL;
        echo '<td>' . $demoitemimage->Id . '</td>' . PHP_EOL;
        echo '<td>' . $demoitemimage->DemonstrationItemImageSide . '</td>' . PHP_EOL;
        echo '<td><img src="/' . $demoitemimage->GetPath() . $demoitemimage->DemonstrationItemImageUrl . '" style="width:200px;"></td>' . PHP_EOL;
        echo '<td>';
        $hcount = $objDemonstrationItemImageHighlight->getCountDemonstrationItemImageHighlightByDemonstrationItemImageId($demoitemimage->Id);
        //echo '<a href="demoitemimagehotspot.php?img=' . $demoitemimage->Id . '">' . $hcount . ' Hotspots</a>';
        // note: above hotspot admin would be pretty complicated from a user perspective (x, y, dimensions, image).
        //       therefore, not implementing now. - Jay
        echo $hcount . ' Hotspots</a>';
        echo '</td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="demoitemimage_admin.php?id=' . $demoitemimage->Id . '" style="width:200px;"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="demoitemimage_delete.php?id=' . $demoitemimage->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $sound_id;
    global $image_file;
    global $path;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Sound Image Add';
    } else {
        $bread_image_name = 'Sound Image Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Sound List';
    $aLinks[2] = 'sound_list.php';
    $aLabels[3] = 'Sound Images';
    $aLinks[3] = 'soundimage_list.php?cat=' . $_REQUEST['cat'] . '&sound=' . $_REQUEST['sound'];
    $aLabels[4] = $bread_image_name;
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="soundimage_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
					    <?php 
    if ($image_file != '') {
        ?>
    						<tr>
    							<td>&nbsp;</td>
    							<td>
    							    <img src="/<?php 
        echo $path . $image_file;
        ?>
" style="width:120px;">
    							</td>
    						</tr>
    						<?php 
    }
    ?>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Image File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="image_file" id="image_file" value="<?php 
    echo htmlspecialchars($image_file);
    ?>
"/>
                    		    <?php 
    if ($image_file != '') {
        echo '<br ><strong>Current File:</strong> ' . $image_file;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Sound Image">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                   	<input type="hidden" name="cat" value="<?php 
    echo $cat;
    ?>
" />
                   	<input type="hidden" name="sound" value="<?php 
    echo $_REQUEST['sound'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    ?>
    
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                // fix to preserve width of cells
                var fixHelper = function(e, ui) {
                    ui.children().each(function() {
                        $(this).width($(this).width());
                    });
                    return ui;
                };
                var saveIndex = function(e, ui) {
                    //alert("New position: " + ui.item.index());
                    //alert("Image Id: " + ui.item.attr("id"));
                    id = ui.item.attr("id").replace("img_", "");
                    $.ajax({
                        url: 'information_list.php',
                        data: {
                            dragsort: 1,
                            idx: ui.item.index(),
                            id: id
                        },
                        type: 'POST',
                        dataType: 'html',
                        success: function (data) {
                            //alert("done");
                        },
                        error: function (xhr, status) {
                            alert('Sorry, there was a problem!');
                        }
                    });
                }; // end saveIndex
    
                $("#list_table tbody").sortable({
                    helper: fixHelper,
                    stop: saveIndex
                }).disableSelection();
    
            }); // end document.ready
        </script>
        <style>
            .icon-resize-vertical:hover {
                cursor:grab;
            }
        </style>        
    
            <div class="layout center-flex">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Information';
    $aLinks[1] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Information</p>
                    <a href="information_admin.php" class="button_link"><button class=" ">Add New Information</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Title</th>
                            <th>File</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objInformation = new Information();
    $oInformation = $objInformation->GetAllInformation('sort_order');
    foreach ($oInformation as $info) {
        echo '<tr id="img_' . $info->Id . '">' . PHP_EOL;
        echo '<td>' . $info->Id . '</td>' . PHP_EOL;
        echo '<td>' . $info->Title . '</td>' . PHP_EOL;
        echo '<td>/' . $objInformation->GetPath() . $info->PdfFile . '</td>' . PHP_EOL;
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="information_admin.php?id=' . $info->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="information_delete.php?id=' . $info->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
function PageContent()
{
    global $id;
    global $technology_name;
    global $technology_headline;
    global $technology_button_image_url;
    global $technology_button_active_image_url;
    global $aDropFields;
    global $aDropFieldTypes;
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<script type="text/javascript" src="tinymce/js/tinymce/tinymce.min.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
	    selector : "textarea.mceEditor",
	    plugins : "image code pagebreak table spellchecker preview searchreplace print contextmenu paste fullscreen nonbreaking",
	    image_advtab : true,
	    forced_root_block : "",
	    setup: function (editor) {
	        editor.on('init', function(args) {
	            editor = args.target;
	
	            editor.on('NodeChange', function(e) {
	                if (e && e.element.nodeName.toLowerCase() == 'img') {
	//                     width = e.element.width;
	//                     height = e.element.height;
	                    tinyMCE.DOM.setAttribs(e.element, {'class':'img_responsive', 'height' : null, 'width' : null});
	                    tinyMCE.DOM.setStyle(e.element, 'max-width', '100%');
	                }
	            });
	        });
	    },
		content_css : ["../css/bootstrip.min.css"],
	    //document_base_url : "http://havells.boxkitemedia.com"
	});
	</script>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = ' Technology Add';
    } else {
        $bread_image_name = ' Technology Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Category List';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Technology';
    $aLinks[2] = 'technology_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = $bread_image_name;
    $aLinks[3] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="technology_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Technology Name: </td>
							<td><input class="form midform" type="text" name="technology_name" value="<?php 
    echo $technology_name;
    ?>
" placeholder="Technology Name" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Technology Headline: </td>
							<td><input class="form midform" type="text" name="technology_headline" value="<?php 
    echo $technology_headline;
    ?>
" placeholder="Technology Headline" /></td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Icon File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="technology_button_image_url" id="technology_button_image_url" value="<?php 
    echo htmlspecialchars($technology_button_image_url);
    ?>
"/>
                    		    <?php 
    if ($technology_button_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $technology_button_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Icon Active File: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="technology_button_active_image_url" id="technology_button_active_image_url" value="<?php 
    echo htmlspecialchars($technology_button_active_image_url);
    ?>
"/>
                    		    <?php 
    if ($technology_button_active_image_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $technology_button_active_image_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[1]);
    ?>
                    		</td>
                    	</tr>
					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Technology">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                   	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}
function PageContent()
{
    global $objCategory;
    global $id;
    ?>

            <div class="layout laymidwidth">

                <?php 
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = 'Categories';
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Delete Category';
    $aLinks[2] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <p class="larger botspace heading">Category Delete</p>

                <script type="text/javascript">
                    $(document).ready(function() {
                        //$('#delete-form').submit(function() {
                        $('#submit').click(function() {
                            if (confirm("Are you sure?")) {
                                return true;
                            }
                            else {
                                return false;
                            }
                        });
                        $('#cancel').click(function() {
                            return true;
                        });
                    });
                </script>
                
                <div class="formstyle">
                    <form method="post" action="category_delete.php" id="delete-form">
                        <p>Are you sure you want to delete this category? This is irreversible.</p>
                        <p>&nbsp;</p>
                	    <table>
                	        <tr>
                	            <td><strong>Category Name: </strong></td>
                	            <td style="width: 20px;">&nbsp;</td>
                	            <td><?php 
    echo $objCategory->CategoryName;
    ?>
</td>
                	        </tr>
                	    </table>
                        <p>&nbsp;</p>
                      	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />

                        <p class="submit"><input type="submit" name="commit" id="submit" value="Delete Category">&nbsp;&nbsp;<input type="submit" id="cancel" name="commit" value="Cancel"></p>

                    </form>
                </div>

            </div>

<?php 
}
function PageContent()
{
    global $id;
    global $item_id;
    global $item_video_title;
    global $item_video_url;
    global $item_video_placeholder_image_url;
    global $path;
    global $aDropFields;
    global $aDropFieldTypes;
    $item = new Item($item_id);
    $category = new Category($item->CategoryId);
    ?>

    <?php 
    // Set up Drag And Drop styles for the drop area
    echo DragAndDrop::SetStyles();
    ?>

	<div id="content">

		<div class="layout">
	        <?php 
    if ($id == 0) {
        $bread_image_name = 'Item Video Add';
    } else {
        $bread_image_name = 'Item Video Edit';
    }
    $aLabels = array();
    $aLinks = array();
    $aLabels[0] = 'Home';
    $aLinks[0] = 'mainpage.php';
    $aLabels[1] = $category->CategoryName;
    $aLinks[1] = 'category_list.php';
    $aLabels[2] = 'Items';
    $aLinks[2] = 'item_list.php?cat=' . $_REQUEST['cat'];
    $aLabels[3] = 'Item Videos';
    $aLinks[3] = 'itemvideo_list.php?cat=' . $_REQUEST['cat'] . '&item=' . $_REQUEST['item'];
    $aLabels[4] = $bread_image_name;
    $aLinks[4] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

		    <p class="larger2 botspace heading"><?php 
    echo $bread_image_name;
    ?>
</p>

			<div class="formstyle ">
				<form method="post" name="admin" id="admin" action="itemvideo_admin.php" enctype='multipart/form-data'>
					<table class="form-table">
						<tr>
							<td class="table-label" align="right">Video Title: </td>
							<td><input class="form midform" type="text" name="item_video_title" value="<?php 
    echo $item_video_title;
    ?>
" placeholder="Video Title" /></td>
						</tr>
						<tr>
							<td class="table-label" align="right">Video File: </td>
							<td><input class="form midform" type="text" name="item_video_url" value="<?php 
    echo $item_video_url;
    ?>
" placeholder="Video File Name" />&nbsp;&nbsp;MP4, WMV or MOV</td>
						</tr>
                    	<tr>
                    		<td class="table-label" align="right" valign="top">Upload Video: </td>
                    		<td><input type="file" class="slick" size="50" maxlength="200" name="video_file" id="video_file" value="<?php 
    echo htmlspecialchars($item_video_url);
    ?>
"/>
                    		    <?php 
    if ($item_video_url != '') {
        echo '<br ><strong>Current File:</strong> ' . $item_video_url;
    }
    // Set up Drop Area
    echo DragAndDrop::CreateArea($aDropFields[0]);
    ?>
                    		</td>
                    	</tr>
                    	<tr>
                    		<td class="table-label">&nbsp;</td>
                    		<td><p>Note: if you have trouble uploading a large file, use FTP to place the file into the folder 'files/itemvideos', then save the file name in 'Video File' above.</p></td>
                    	</tr>

					</table>
				
					<p class="submit"><input type="submit" name="commit" value="Save Item Video">&nbsp;&nbsp;<input type="submit" name="commit" value="Cancel"></p>
				
                   	<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
" />
                   	<input type="hidden" name="cat" value="<?php 
    echo $_REQUEST['cat'];
    ?>
" />
                   	<input type="hidden" name="item" value="<?php 
    echo $_REQUEST['item'];
    ?>
" />

				</form>
			</div>
		</div>

	</div>

<?php 
    // Set up Drag and Drop javascript controls
    echo DragAndDrop::Control($aDropFields, $aDropFieldTypes);
}