if ($GalleryCount <= "0") { $GalleryCount = "0"; } $roW = PbUnSerial($roW); ?> <tr class="odd gradeX"> <td><input type="checkbox" name="edit[]" value="<?php echo $Row['id']; ?> "></td> <td><?php echo $Row['content']['name']; ?> </td> <td><?php echo StatusName($Row['active']); ?> </td> <td class="center"> <div class="btn-group"> <button class="btn btn-default btn-xs" type="button">Actions</button> <button data-toggle="dropdown" class="btn btn-xs btn-primary dropdown-toggle" type="button"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button> <ul role="menu" class="dropdown-menu"> <li><a href="/admin/Cinema/<?php echo $ArticleId; ?> ">Edit</a></li> <li><a href="/Process/Copy/Cinema/<?php echo OtarEncrypt($key, $ArticleId); ?> ">Copy</a></li>
<thead> <tr> <th>Name</th> <th>Category</th> <th>Status</th> <th>Settings</th> </tr> </thead> <tbody> <?php $Query = "SELECT * FROM cwoptions WHERE type='attribute' AND trash='0' ORDER BY id"; $Result = mysql_query($Query) or die(mysql_error()); while ($Row = mysql_fetch_array($Result)) { $Row = PbUnSerial($Row); $Status = StatusName($Row['active']); $ArticleCat = $Row['category']; $ArticleId = $Row['id']; $ArticleId = OtarEncrypt($key, $ArticleId); $query = "SELECT * FROM articles WHERE id='{$ArticleCat}' AND active='1' AND trash='0'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $row = PbUnSerial($row); ?> <tr class="odd gradeX"> <td><?php echo $Row['name']; ?> </td> <td><?php echo $Row['category'];
} if (isset($_GET["delete"])) { $action = "delete"; } if (isset($_GET["result"])) { $core->assign('result', $_GET["result"]); } if ($action == "home") { $names = $core->GetAllUserNames(); $names[0] = "-"; $result = $core->SQL("SELECT t1.id,t1.Notes,t1.Owner,t1.Date,t1.Priority,t1.Count,t1.IsAlly,t2.Price,t2.AlliancePrice,t1.Manager,t1.Status,t2.EveGraphicID,t2.GroupName,t2.Race,t2.Name FROM production_orders AS t1 INNER JOIN production_items AS t2 ON t1.Item=t2.id WHERE t1.IsDeleted=0 ORDER BY t1.Priority DESC, t1.Date ASC"); $orders = array(); $total = 0; while ($row = mysql_fetch_assoc($result)) { $price = $row["IsAlly"] ? $row["AlliancePrice"] : $row["Price"]; $orders[] = array("ID" => $row["id"], "Priority" => PriorityName($row["Priority"]), "Notes" => $core->SQLUnEscape($row["Notes"]), "Owner" => $names[$row["Owner"]], "IsAlly" => $row["IsAlly"], "Manager" => $names[$row["Manager"]], "Status" => StatusName($row["Status"]), "EveGraphicID" => $row["EveGraphicID"], "GroupName" => $core->SQLUnEscape($row["GroupName"]), "Race" => $core->SQLUnEscape($row["Race"]), "Name" => $core->SQLUnEscape($row["Name"]), "Count" => $row["Count"], "Price" => number_format($price, 0), "Cost" => number_format($row["Count"] * $price, 0), "Date" => $core->GMTToLocal($row["Date"])); $total += $row["Count"] * $price; } mysql_free_result($result); $core->assign("orders", $orders); $core->assign("total", number_format($total, 0)); // Misc orders $result = $core->SQL("SELECT id,Owner,Date,Notes FROM production_orders WHERE IsDeleted=0 AND Item=0 ORDER BY Date DESC"); $misc = array(); $total = 0; while ($row = mysql_fetch_assoc($result)) { $misc[] = array("ID" => $row["id"], "Notes" => $core->SQLUnEscape($row["Notes"]), "Owner" => $names[$row["Owner"]], "Date" => $core->GMTToLocal($row["Date"])); } mysql_free_result($result); $core->assign("misc", $misc); } elseif ($action == "summary") {
} else { $result = $core->SQL("SELECT t1.id,t1.Date,t1.Count,t2.Price,t1.Manager,t1.Status,t2.EveGraphicID,t2.GroupName,t2.Race,t2.Name FROM production_orders AS t1 INNER JOIN production_items AS t2 ON t1.Item=t2.id WHERE t1.Owner=" . $core->CurrentUser()->ID . " AND t1.IsDeleted=0 AND t1.Item!=0 ORDER BY t1.Date DESC LIMIT 50"); } $orders = array(); while ($row = mysql_fetch_assoc($result)) { $orders[] = array("ID" => $row["id"], "Cost" => number_format($row["Count"] * $row["Price"], 0), "Manager" => $names[$row["Manager"]], "Status" => StatusName($row["Status"]), "StatusID" => $row["Status"], "Price" => $row["Price"], "EveGraphicID" => $row["EveGraphicID"], "GroupName" => $core->SQLUnEscape($row["GroupName"]), "Race" => $core->SQLUnEscape($row["Race"]), "Name" => $core->SQLUnEscape($row["Name"]), "Count" => $row["Count"], "Date" => $core->GMTToLocal($row["Date"])); } mysql_free_result($result); $core->assign("orders", $orders); } elseif ($action == "queue") { $names = $core->GetAllUserNames(); $names[0] = "-"; $result = $core->SQL("SELECT t1.id,t1.Owner,t1.Date,t1.Count,t1.Manager,t1.Status,t2.EveGraphicID,t2.GroupName,t2.Race,t2.Name FROM production_orders AS t1 INNER JOIN production_items AS t2 ON t1.Item=t2.id WHERE t1.IsDeleted=0 AND t1.Item!=0 ORDER BY t1.Date DESC LIMIT 50"); $orders = array(); while ($row = mysql_fetch_assoc($result)) { $orders[] = array("ID" => $row["id"], "Owner" => $names[$row["Owner"]], "Manager" => $names[$row["Manager"]], "Status" => StatusName($row["Status"]), "EveGraphicID" => $row["EveGraphicID"], "GroupName" => $core->SQLUnEscape($row["GroupName"]), "Race" => $core->SQLUnEscape($row["Race"]), "Name" => $core->SQLUnEscape($row["Name"]), "Count" => $row["Count"], "Date" => $core->GMTToLocal($row["Date"])); } mysql_free_result($result); $core->assign("orders", $orders); } elseif ($action == "addship") { if ($core->CurrentUser()->IsAlly) { $result = $core->SQL("SELECT id,Name,GroupName,AlliancePrice AS Price FROM production_items WHERE Type=0 AND AlliancePrice!=0 ORDER BY GroupName ASC, Race ASC, Name ASC"); } else { $result = $core->SQL("SELECT id,Name,GroupName,Price FROM production_items WHERE Type=0 ORDER BY GroupName ASC, Race ASC, Name ASC"); } $items = array(); while ($row = mysql_fetch_assoc($result)) { $items[] = array("ID" => $row["id"], "Price" => number_format($row["Price"], 0), "Name" => $core->SQLUnEscape($row["Name"]), "GroupName" => $core->SQLUnEscape($row["GroupName"]), "Stockpile" => 0); } mysql_free_result($result); $core->assign("items", $items);