( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
if (empty($page)){
$page = 0;
}
$record = 5;
if ($Delepisode==$admin_yes) {
$db->delepisode($catid,$batch);
}
if (!empty($addbatch)) {
$db->addbatch($catalogname,$description,$parentid,$productnos,$vcat,$manufacture,$keywords,$expiry);
}
if (!empty($editcatalog)) {
$db->editcatalog($catalognamex,$descriptionx,$vcat,$manufacture,$comments,$expiry,$catid,$status,$batchid);
$db->productStatus($batchid,$status,$comments);
if (!empty($status) || !empty($comments) ) { }
}
$result = $db->getallepisodes($page,$record);
$myuser = $_SESSION['euserid'];
?>
<style type="text/css">
<!--
.style3 {font-size: 14px}
.style4 {font-size: 10px}
.style6 {font-size: 12px}
.style8 {font-size: 10px; color: #00CC00; }
-->
</style>
<script>
$(document).ready(function(){
$.validator.addMethod("username", function(value, element) {
return this.optional(element) || /^[a-z0-9\_]+$/i.test(value);
}, "Username must contain only letters, numbers, or underscore.");
$.validator.addMethod("slug", function(value, element) {
return this.optional(element) || /^[a-z0-9\_-]+$/i.test(value);
}, "Username must contain only letters, numbers, or underscore.");
$("#batchForm").validate();
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#copy').hide();
});
$(function() {
$(".copyBatch").click(function() {
$('#copy').fadeIn();
document.getElementById('copy').innerHTML = "<center><img src=images/loadinglong.gif hspace=3 align=texttop width=300 height=12><br>Copying your batches and related infomation...<br><font size=1>-<strong>Abuse of this feature</strong> is highly discouraged and is subject to cancellation of your Account </font></center>";
var id = $(this).attr("id");
var commentContainer = $('#record-'+id);
var string = 'mode=weka&processBatch='+ id ;
$.ajax({
type: "GET",
url: "cg",
data: string,
cache: false,
success: function(){
cgLoadRemote('cate','catemini');
document.getElementById('copy').innerHTML = "<div class=formbutton><strong><font size=3>Successfully copied your batch:</font><font size=2><br>-Remember to Rename the batch you just copied!<br />-Products in your new batch are still unique and not the same as the one you copied from<br />-<strong>Abuse of this feature</strong> is highly discouraged and is subject to cancellation of your Account<br />-You should only copy a batch if you have exhausted the ones you have created.</font></strong></div>";
commentContainer.slideUp('slow', function() {$(this).remove();});
//$('#copy').fadeOut();
}
});
return false;
});
});
</script>
<?php /*?><?php
$fon = randomPrefix(6);
echo $fon = strtoupper($fon);?><?php */?>
<?php
$string="catalogname-description-expiry-manufacture-vcat-productnos-keywords";
$process = explode("-", $string);
$checkcount = count($process);
$keywords = $checkcount - 1;
$productnos= $checkcount - 2;
$vcat = $checkcount - 3;
$manufacture= $checkcount - 4;
$expiry = $checkcount - 5;
$description= $checkcount - 6;
$catalogname = $checkcount - 7;
$keywords = $process[$keywords];
$productnos= $process[$productnos];
$vcat = $process[$vcat];
$manufacture= $process[$manufacture];
$expiry = $process[$expiry];
$description= $process[$description];
$catalogname = $process[$catalogname];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100%" valign="top">
<div id="cate" style="font-size:12px;"><?php
if (!empty($result)) {?>
<div style="padding:10px;">
<div class="wa">
<div class="wb">
<div class="wc">
<div class="wd">
<span id="buttoned"><strong>My Product Batches</strong> <?php
include("includes/countmyproducts.php");
?> </span><br />
<br />
<br />
<table width="601" border="0" cellpadding="4" cellspacing="5" >
<tr class="style6">
<td width="51" height="46"><span class="style11 style3"><strong>B/Code </strong></span></td>
<td width="99"><span class="style11 style3"><strong>Batch Name</strong></span></td>
<td width="40"><span class="style11 style3"><strong>No</strong></span></td>
<td width="30"><span class="style11 style3"><strong>Date</strong></span></td>
<td colspan="5"><div align="center"><span class="style11 style3"><strong><?php print "$admin_opreation"; ?></strong></span></div></td>
</tr>
<?php
if (!empty($result)) {
foreach ($result as $key => $val) {
$catalogid = stripslashes($val["catalogid"]);
$catalogname = stripslashes($val["catalogname"]);
$description = stripslashes($val["description"]);
$parentid = stripslashes($val["parentid"]);
$adddate = stripslashes($val["adddate"]);
$productnos = stripslashes($val["productnos"]);
$batchid = stripslashes($val["batchid"]);
$expiry = stripslashes($val["expiry"]);
$manufacture = stripslashes($val["manufacture"]);
$vcat = stripslashes($val["vcat"]);
$keywords = stripslashes($val["keywords"]);
$parentname = $db->getcatalognamebyid($parentid);
?>
<tr id="record-<?php print "$catalogid"; ?>">
<td height="40" class="style6"><?php print "$batchid"; ?></td>
<td class="style6"><?php print "$catalogname"; ?></td>
<td class="style6"><?php print "$productnos"; ?></td>
<td class="style6"><?php print "$adddate"; ?></td>
<td width="86" class="style6"><div align="right"><a href="?mode=process&page=1&catid=<?php print "$batchid"; ?>" class="formbutton">Export Batch </a></div></td>
<td width="46" class="style6"><div align="right"><a href="?mode=products&page=1&catid=<?php print "$batchid"; ?>" class="formbutton">view </a></div></td>
<td width="52" class="style6" align="center"> <?php if ($admin==1){ ?><a href="?mode=upgrade&msg=upgrade to copy and reuse existing batches" class="formbutton" target="_blank">Copy</a><?php } ?><?php if ($admin==2){ ?><a href="#" id="<?php print "$catalogname"; ?>-<?php print "$description"; ?>-<?php print "$expiry"; ?>-<?php print "$manufacture"; ?>-<?php print "$vcat"; ?>-<?php print "$productnos"; ?>-<?php print "$keywords"; ?>" class="copyBatch formbutton">Copy </a><?php } ?> </td>
<td width="34" class="style6" align="center"> <a href="?mode=editcate&catid=<?php print "$catalogid"; ?>" class="formbutton"><?php print "$admin_edit"; ?></a> </td>
<td width="41" class="style6"><div align="right"><a href="?mode=delecate&catid=<?php print "$catalogid"; ?>&batch=<?php print "$batchid"; ?>" class="formbutton5"><?php print "$admin_del"; ?></a></div></td>
</tr>
<?php
}
}
?>
</table>
<br />
<br />
<?php
$pagenext = $page+1;
$result1 = $db->getallepisodes($pagenext,$record,$catid);
if ($page!=0)
{
$pagepre = $page-1;
print "<a class=formbutton href=\"?mode=cate&page=$pagepre&catid=$catid\">Previous</a> ";
}
if (!empty($result1))
{
print "<a class=formbutton href=\"?mode=cate&page=$pagenext&catid=$catid\">More</a> ";
}
?>
<?php if ($admin==1){ ?><br />
<br />
<div align="right"> <span style="font-size:12px">To copy and reuse previous Batches and information you have created you need to </span> <a href="?mode=upgrade" class="formbutton" style="font-size:11px; padding:3px">upgrade your account</a> </div> <br />
<br />
<?php } ?>
</div>
</div></div></div></div>
<?php } ?>
</div>
<div id="copy" style="font-size: 17px;padding:10px;" >Preparing CGEngine...</div>
<div id="batchDone" style="font-size: 17px;padding:10px;" >
<br> <div style="padding:10px;">
<div class="wa">
<div class="wb">
<div class="wc">
<div class="wd">
<table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<span id="buttoned"><strong>Add Product Batch</strong> </span><br />
<br />
<br />
<div id="batchit" style="font-size: 17px;padding:10px;">
</div>
<form method="post" action="javascript:processBatch()" name="batchForm" id="batchForm" >
<table width="600" border="0"cellspacing="1" cellpadding="2">
<tr >
<td width="155" height="50" class="style6" >Product Name in this Batch:<br />
<span class="style4"><a href="?mode=details#default" class="formbutton2">Set Default </a></span></td>
<td width="434" class="style6" ><input name="catalogname" type="text" value="<?php echo $productname; ?>" class="bigsearch required" id="catalogname" size="50" maxlength="30"></td>
</tr>
<tr >
<td height="133" class="style6">Your Custom SMS Message :<br />
<span class="style4"><a href="?mode=details#default" class="formbutton2">Set Default </a></span><br />
<span class="style4"> </span></td>
<td class="style6"><textarea name="description" id="description" maxlength="50" cols="40" class="bigsearch required" style="height:100px;" rows="5"><?php echo $message; ?></textarea></td>
</tr>
<?php require("includes/date.php"); ?>
<tr >
<td width="155" height="57" class="style6" >Product Category</td>
<td width="434" class="style6" ><select name="vcat" id="vcat" class="bigsearch">
<?php
$nameinfo = $db->getProductCategories();
if (!empty($nameinfo)){
while (list($key,$val)=each($nameinfo)) {
$categoryid = stripslashes($val["categoryid"]);
$categoryname = stripslashes($val["categoryname"]);
require("includes/cata.php");
print "<option value=\"$categoryid\">$categoryname</option>";
}
}
?>
</select> </td>
</tr>
<tr >
<td width="155" height="79" class="style6" >Number of Products in this Batch<br />
<?php if ($admin==1){ ?> <span class="style8">Upgrade to get upto 20,000 products per batch</span> <?php } ?></td>
<td width="434" class="style6" ><select class="bigsearch" name="productnos" id="productnos" >
<option value="500">500</option>
<option value="1000">1000</option>
<?php if ($admin==2){ ?> <option value="5000">5000</option>
<option value="10000">10000</option>
<option value="20000">20000</option><?php } ?>
</select><input name="keywords" id="keywords" type="hidden" size="50" /> </td>
</tr>
<tr >
<td class="style6"> </td>
<td class="style6"><p>
</p>
<p><span id="loading">
<input name="addbatch" type="submit" id="buttoned4" style="width:200px; padding:18px; margin:0px; border:0px" value="Process Product Batch "></span> </p></td>
</tr>
</table>
<p><a href="home"><?php print "$admin_back"; ?></a> </p>
</form> </td>
</tr>
</table></div></div></div></div></div>
</div>
<p align="right"> </p></td>
</tr>
</table>