Esempio n. 1
0
function listCategory($level, $parent, $current_category)
{
    $conn = connDB();
    $get_data = mysql_query("SELECT * from tbl_tag AS cat INNER JOIN tbl_tag_relation AS cat_rel ON cat.category_id = cat_rel.category_child\n\t                        WHERE cat.category_level = '{$level}' AND cat_rel.category_parent = '{$parent}' ORDER BY category_order", $conn);
    if (mysql_num_rows($get_data) != null && mysql_num_rows($get_data) != 0) {
        for ($counter = 1; $counter <= mysql_num_rows($get_data); $counter++) {
            $get_data_array = mysql_fetch_array($get_data);
            $new_level = $level * 1 + 1;
            $new_parent = $get_data_array["category_id"];
            echo '<div class="col-xs-9 ';
            if ($level !== 1) {
                echo 'hidden';
            }
            echo ' ">';
            echo '<input type="checkbox" class="form-control' . $level . '" data-level="' . $level . '" id="option_level_' . $level . '"value="' . $new_parent . '" style="margin-bottom:10px;" name="tag_id[]">';
            echo '&nbsp;';
            for ($i = 0; $i < $level; $i++) {
                echo '-- ';
            }
            echo $get_data_array["category_name"] . '</option>';
            echo '</div>';
            listCategory($new_level, $new_parent, $current_category);
        }
    }
}
Esempio n. 2
0
function listCategory($level, $parent, $current_category)
{
    $conn = connDB();
    $get_data = mysql_query("SELECT * from tbl_category AS cat INNER JOIN tbl_category_relation AS cat_rel ON cat.category_id = cat_rel.category_child\n\t                        WHERE cat.category_level = '{$level}' AND cat_rel.category_parent = '{$parent}' ORDER BY category_order", $conn);
    if (mysql_num_rows($get_data) != null && mysql_num_rows($get_data) != 0) {
        for ($counter = 1; $counter <= mysql_num_rows($get_data); $counter++) {
            $get_data_array = mysql_fetch_array($get_data);
            $new_level = $level * 1 + 1;
            $new_parent = $get_data_array["category_id"];
            echo '<option class="option_level_' . $level . '" data-level="' . $level . '" id="option_level_' . $level . '"';
            if ($current_category == $new_parent . "'") {
                echo "selected=selected";
            }
            echo ' value="' . $new_parent . '">';
            for ($i = 0; $i < $level; $i++) {
                echo '-- ';
            }
            echo $get_data_array["category_name"] . '</option>';
            listCategory($new_level, $new_parent, $current_category);
        }
    }
}
        }
        print "</table>";
    }
}
$cat = getCategory($_GET["cat"]);
$links = new PipeMenu();
if ($_GET["cat"] != -2 && $loguserid && !$isBot) {
    $links->add(new PipeMenuLinkEntry("Upload file", "uploader", "", "action=uploadform&cat=" . $_GET["cat"], "cloud-upload"));
}
makeLinks($links);
$crumbs = new PipeMenu();
$crumbs->add(new PipeMenuLinkEntry(__("Uploader"), "uploader"));
$crumbs->add(new PipeMenuLinkEntry($cat["name"], "uploaderlist", "", "cat=" . $cat["id"]));
makeBreadcrumbs($crumbs);
print "<form method=\"post\" action=\"" . actionLink("uploader", "", "cat={$_GET["cat"]}") . "\">";
listCategory($_GET["cat"]);
print "</form>";
function getCategory($cat)
{
    if (!is_numeric($cat)) {
        Kill('Invalid category');
    }
    if ($cat >= 0) {
        $rCategory = Query("select * from {uploader_categories} where id={0}", $cat);
        if (NumRows($rCategory) == 0) {
            Kill("Invalid category");
        }
        $rcat = Fetch($rCategory);
    } else {
        if ($cat == -1) {
            $rcat = array("id" => -1, "name" => "Private files");
Esempio n. 4
0
		else $style="";

		echo " <div class='menu1' $style ><a href='".getLeonardoLink(array('op'=>'competition','comp'=>$subcatID) )."'>$subcatTitle</a></div>";	
	}
	
	
   echo "<div style='height:5px;clear:both;'></div>";
   
   echo "<div class='list_header'>
				<div class='list_header_r'></div>
				<div class='list_header_l'></div>
				<h1>$legend</h1>
				<div class='pagesDiv'>$legendRight</div>
			</div>";

  listCategory($leagueCategories[$leagueCategory]['legend'],$leagueCategories[$leagueCategory]['header'],
				$leagueCategories[$leagueCategory]['arrayName'],$leagueCategories[$leagueCategory]['formatFunction']);
/*
  listCategory(_OLC,				_OLC_TOTAL_SCORE,"olc_score","formatOLCScore");
  listCategory(_FAI_TRIANGLE, 		$FAI_TRIANGLE_str ,"triangleKm","formatDistance");   
  listCategory(_MENU_OPEN_DISTANCE,	$MENU_OPEN_DISTANCE_str,"open_distance","formatDistance");
  listCategory(_DURATION,			_TOTAL_DURATION,"duration","sec2Time"); 
  listCategory(_ALTITUDE_GAIN,		_TOTAL_ALTITUDE_GAIN,"alt_gain","formatAltitude"); 
*/


function listCategory($legend,$header, $arrayName, $formatFunction="") {
   global $$arrayName;
   global $pilotNames,$pilotGlidersMax;
   
   global $Theme;
   global $moduleRelPath;
Esempio n. 5
0
     addCustomerComplaint();
     break;
 case 'addVehicle':
     addVehicle();
     break;
 case 'addVehicleComplaint':
     addVehicleComplaint();
     break;
 case 'listAllModels':
     listAllModels();
     break;
 case 'listCategorynParts':
     listCategorynParts();
     break;
 case 'listCategory':
     listCategory();
     break;
 case 'addFailureDetails':
     addFailureDetails();
     break;
 case 'addComplaintDetails':
     addComplaintDetails();
     break;
 case 'editComplaintDetails':
     editComplaintDetails();
     break;
 case 'listAllActions':
     listAllActions();
     break;
 case 'listActionsTaken':
     listActionsTaken();
Esempio n. 6
0
include "get.php";
include "update.php";
include "control.php";
?>


<form method="post">

            <div class="subnav">
              <div class="container clearfix">
                <h1><span class="glyphicon glyphicon-list"></span> &nbsp; Filter (substrat)</h1>
                <select class="form-control" id="category_name_search" onchange="selectCategory()">
                  <option value="top">All Category</option>
                  <?php 
listCategory(0, 'top');
?>
                </select>
                <div class="btn-placeholder">
                  <input type="submit" class="btn btn-danger btn-sm" value="Remove All Filter" name="btn_filter_add">
                  <input type="button" class="btn btn-success btn-sm" value="Save Changes" onClick="validateSale()">
                  <input type="submit" class="btn btn-success btn-sm hidden" value="Apply Discount" id="btn_submit_sale" name="btn_filter_add">
                </div>
              </div>
            </div>

            <?php 
if (!empty($_SESSION['alert'])) {
    echo '<div class="alert ' . $_SESSION['alert'] . '">';
    echo '<div class="container">' . $_SESSION['msg'] . '</div>';
    echo '</div>';
Esempio n. 7
0
    }
}
if ($customFormatFunction) {
    $formatFunction = $customFormatFunction;
} else {
    $formatFunction = "formatOLCScore";
}
if ($customRankHeader) {
    $rankHeader = $customRankHeader;
} else {
    $rankHeader = _OLC_TOTAL_SCORE;
}
if ($listClubs) {
    listClubs($subrankTitle, $rankHeader, "score", "score", $formatFunction);
} else {
    listCategory($subrankTitle, $rankHeader, "score", "score", $formatFunction);
}
?>
</div>
<?php 
function listCategory($legend, $header, $category, $key, $formatFunction = "")
{
    global $pilots;
    global $Theme, $countries;
    global $moduleRelPath;
    global $CONF_compItemsPerPage;
    global $page_num, $pagesNum, $startNum, $itemsNum;
    global $op, $cat;
    global $countHowMany;
    global $tabID;
    global $sort_funcs_pilots;