Initial commit
[2ch-be.git] / artist / include / nav.php
blob59d583b3f0319635e40a567faa0c346f315a01e9
1 <div class="col-md-3">
2 <div class="panel panel-default">
3 <div class="panel-heading">
4 <center>
5 <b>Options</b>
6 </center>
7 </div>
8 <div class="list-group">
9 <?php if ($_SESSION['utype'] == "admin") { ?>
10 <a class="list-group-item <?php echo (isset($_GET['crar'])) ? "active" : ""; ?>" href="?crar">Create Artist Account</a>
11 <a class="list-group-item <?php echo (isset($_GET['vtrans'])) ? "active" : ""; ?>" href="?vtrans">View Transactions</a>
12 <a class="list-group-item <?php echo (isset($_GET['alist'])) ? "active" : ""; ?>" href="?alist">Artist List</a>
13 <?php } elseif ($_SESSION['utype'] == "user") { ?>
14 <a class="list-group-item <?php echo (isset($_GET['art'])) ? "active" : ""; ?>" href="?art">Art List (Uncategorized) </a>
15 <a class="list-group-item <?php echo (isset($_GET['usercat'])) ? "active" : ""; ?>" href="?usercat">User Category List</a>
16 <a class="list-group-item <?php echo (isset($_GET['upload'])) ? "active" : ""; ?>" href="?upload">Upload Image</a>
17 <?php } ?>
18 </div>
19 </div>
20 <!-- start panel -->
21 <?php if($_SESSION['utype'] == "user") {
22 $category = file(ADBD_PATH."class.log");
23 if(count($category)<=0){
24 $hidden = "hidden";
25 }else{
26 $hidden = "";
30 <div class="panel panel-default <?=$hidden ?>" id="categoryPanelDiv">
31 <div class="panel-heading">
32 <center>
33 <b>Category List</b>
34 </center>
35 </div>
36 <div id="categoryList" class="list-group">
37 <?php
38 $getCat = (isset($_GET['cat'])) ? $_GET['cat'] : "";
39 foreach ($category as $key => $value) {
40 $name = within_str($value, "<classname>", "</classname>");
41 $id = within_str($value, "<id>", "</id>");
42 $current = ($getCat==$name) ? "active" : "";
43 echo '<a class="list-group-item '.$current.'" href="?art&cat='.$name.'">'.ucfirst($name).' <span class="badge pull-right">'.countClass($id, $_SESSION['artistid']).'</span></a>';
47 </div>
48 </div>
49 <?php
52 <!-- end panel heading -->
53 </div>