Inheritance: extends Resource
Ejemplo n.º 1
0
function insertSkills($skills, $student_id)
{
    foreach ($skills as $tech) {
        $techId = Technology::checkTechnologyExists(trim($tech));
        if ($techId <= 0) {
            $technology = new Technology();
            $technology->name = trim($tech);
            $technology->save(TRUE);
        }
        if (!Endorsement::checkEndorsementExists($techId, $student_id)) {
            $endorsement = new Endorsement();
            $endorsement->student_id = $student_id;
            $endorsement->technology_id = $techId;
            $endorsement->count = 1;
            $endorsement->save(TRUE);
        }
    }
}
 public function __construct($majorVersion = null, $minorVersion = null, $microVersion = null, $id = null, $name = null)
 {
     parent::__construct();
     $this->majorVersion = $majorVersion;
     $this->minorVersion = $minorVersion;
     $this->microVersion = $microVersion;
     $this->id = $id;
     $this->name = $name;
 }
 public function __construct($majorVersion = NULL, $minorVersion = NULL, $microVersion = NULL, $id = NULL, $name = NULL, $TechnologyType = NULL)
 {
     parent::__construct();
     $this->majorVersion = $majorVersion;
     $this->minorVersion = $minorVersion;
     $this->microVersion = $microVersion;
     $this->id = $id;
     $this->name = $name;
     $this->TechnologyType = $TechnologyType;
 }
Ejemplo n.º 4
0
        }
        $objItemImage = new ItemImage();
        $oItemImage = $objItemImage->getAllItemImageByItemIdItemImageSide($item->Id, 'Front');
        $this_content .= '<div class="menu-item menu-nav-item col-sm-3">';
        $this_content .= '	<a href="single-product.php?id=' . $item->Id . '"><img src="' . $objItemImage->getPath() . $oItemImage[0]->ItemImageUrl . '" alt="' . $item->ItemName . '"></a>';
        $this_content .= '	<a href="single-product.php?id=' . $item->Id . '">' . $item->ItemName . '</a>';
        $this_content .= '</div>';
        $cClass = '';
        // Turn off active after first item
    }
    echo "            category_names[" . $cat->Id . "] = '" . $cat->CategoryName . "';\n";
    $this_content .= "</div>";
    $cat_content[$cat->Id] = $this_content;
    echo "            category_content[" . $cat->Id . "] = '" . $this_content . "';\n";
}
$objTechnology = new Technology();
$tech_content = array();
foreach ($oCategory as $cat) {
    $this_content = "";
    $oTechnology = $objTechnology->GetAllTechnologyByCategoryId($cat->Id);
    $iCnt = 3;
    // Go ahead and set it to the max to kick of a new div
    $iTotalInView = 3;
    $cClass = ' active';
    foreach ($oTechnology as $technology) {
        if ($technology->IsActive == '1') {
            $iCnt++;
            if ($iCnt > $iTotalInView) {
                if ($cClass == '') {
                    $this_content .= '</div>';
                }
Ejemplo n.º 5
0
 public function __construct($majorVersion = NULL, $minorVersion = NULL, $microVersion = NULL, $id = NULL, $name = NULL, $TechnologyType = NULL)
 {
     if (get_parent_class('OperatingSystemVersion')) {
         parent::__construct();
     }
     $this->majorVersion = $majorVersion;
     $this->minorVersion = $minorVersion;
     $this->microVersion = $microVersion;
     $this->id = $id;
     $this->name = $name;
     $this->TechnologyType = $TechnologyType;
 }
Ejemplo n.º 6
0
        // insert
        $obj = new Technology();
        $obj->CategoryId = $_REQUEST["cat"];
        $obj->TechnologyName = $_REQUEST["technology_name"];
        $obj->TechnologyHeadline = $_REQUEST["technology_headline"];
        $obj->LinkUrl = 'tech-standard.php';
        $obj->create();
        $obj->handleFileUploads();
        $obj->handleDropFileUploads($aDropFields[0], 'TechnologyButtonImageUrl');
        $obj->handleDropFileUploads($aDropFields[1], 'TechnologyButtonActiveImageUrl');
        // redirect to listing list
        header("Location:technology_list.php?cat=" . $_REQUEST['cat']);
        exit;
    } else {
        // update
        $obj = new Technology($_REQUEST["id"]);
        $obj->TechnologyName = $_REQUEST["technology_name"];
        $obj->TechnologyHeadline = $_REQUEST["technology_headline"];
        $obj->update();
        $obj->handleFileUploads();
        $obj->handleDropFileUploads($aDropFields[0], 'TechnologyButtonImageUrl');
        $obj->handleDropFileUploads($aDropFields[1], 'TechnologyButtonActiveImageUrl');
        // redirect to listing list
        header("Location:technology_list.php?cat=" . $_REQUEST['cat']);
        exit;
    }
} else {
    if ($_REQUEST['mode'] == 'e') {
        //listing
        $objTechnology = new Technology($id);
        $technology_name = $objTechnology->TechnologyName;
Ejemplo n.º 7
0
				</div>
				<div class="menu-item menu-nav-item col-sm-3">
					<a href="eqp-menu.html"><img src="assets/img/eqp-1.png" alt="Equipment"></a>
					<a href="eqp-menu.html">Title</a>
				</div>
				<div class="menu-item menu-nav-item col-sm-3">
					<a href="eqp-menu.html"><img src="assets/img/eqp-1.png" alt="Equipment"></a>
					<a href="eqp-menu.html">Title</a>
				</div>
				-->
			</div>
			<div class="row row3">
				<div class="section white-border-top">
					<h2>Equipment Technology</h2>
					<?php 
$objTechnology = new Technology();
$oTechnology = $objTechnology->GetAllTechnology('sort_order');
foreach ($oTechnology as $technology) {
    echo '<div class="menu-item col-sm-4">' . PHP_EOL;
    echo '	<a data-id="/' . $objTechnology->getPath() . $technology->TechnologyButtonActiveImageUrl . '" href="' . $technology->LinkUrl . '" class="icon-mousedown"><img src="' . $objTechnology->getPath() . $technology->TechnologyButtonImageUrl . '" alt="' . $technology->TechnologyName . '"></a>' . PHP_EOL;
    echo '	<a href="' . $technology->LinkUrl . '">' . $technology->TechnologyName . '</a>' . PHP_EOL;
    echo '</div>' . PHP_EOL;
}
?>
					<!--
					<div class="menu-item col-sm-4">
						<a data-id="tech-sound" href="tech-sound.html" class="icon-mousedown"><img src="assets/img/tech-sound.png" alt="Audio"></a>
						<a href="tech-sound.html">Audio Reduction</a>
					</div>
					<div class="menu-item col-sm-4">
						<a data-id="tech-ibeacon" href="tech-ibeacon.html" class="icon-mousedown"><img src="assets/img/tech-ibeacon.png" alt="Ibeacon"></a>
Ejemplo n.º 8
0
 public function __construct($id = NULL, $name = NULL, $TechnologyType = NULL)
 {
     if (get_parent_class('OperatingSystem')) {
         parent::__construct();
     }
     $this->id = $id;
     $this->name = $name;
     $this->TechnologyType = $TechnologyType;
 }
Ejemplo n.º 9
0
 private function insertSkills($skillsList)
 {
     if (is_array($skillsList)) {
         foreach ($skillsList as $record) {
             $tech = $record->skill->name;
             $techId = Technology::checkTechnologyExists(trim($tech));
             if ($techId <= 0) {
                 $technology = new Technology();
                 $technology->name = trim($tech);
                 $technology->save(TRUE);
                 $techId = $technology->id;
             }
             if (!Endorsement::checkEndorsementExists($techId, $this->id)) {
                 $endorsement = new Endorsement();
                 $endorsement->student_id = $this->id;
                 $endorsement->technology_id = $techId;
                 $endorsement->count = 1;
                 $endorsement->save(TRUE);
             }
         }
     }
 }
Ejemplo n.º 10
0
require '../inc/classes/Helpers.php';
// page vars
$page_title = "";
$id = $_REQUEST['id'];
// id required
if ($id == "") {
    header("Location:mainpage.php");
    exit;
}
// if form was submitted
if ($_POST['commit'] == "Cancel") {
    header("Location:technology_list.php?cat=" . $_REQUEST['cat']);
    exit;
}
if ($_POST['commit'] == "Delete Technology") {
    $objTechnology = new Technology();
    $objTechnology->Delete($id);
    header("Location:technology_list.php?cat=" . $_REQUEST['cat']);
    exit;
}
$objTechnology = new Technology($id);
include "includes/pagetemplate.php";
function PageContent()
{
    global $objTechnology;
    global $id;
    ?>

            <div class="layout laymidwidth">

                <?php 
Ejemplo n.º 11
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: 'technology_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] = '';
    echo Helpers::CreateBreadCrumbs($aLabels, $aLinks);
    ?>

                <div class="bigbotspace flex-container space-between">
                    <p class="larger auto heading">Technology</p>
                    <a href="technology_admin.php?cat=<?php 
    echo $_REQUEST['cat'];
    ?>
" class="button_link"><button class="">Add New Technology</button></a>
                </div>
            </div>
    
            <div class="layout">
    
                <table class="tablestyle" id="list_table">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Technology Name</th>
                            <th>Info Items</th>
                            <th class="mid">Order</th>
                            <th class="mid">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php 
    $objTechnology = new Technology();
    $oTechnology = $objTechnology->GetAllTechnologyBycategoryId($_REQUEST['cat']);
    $objTechnologyInfo = new TechnologyInfo();
    foreach ($oTechnology as $technology) {
        echo '<tr id="img_' . $technology->Id . '">' . PHP_EOL;
        echo '<td>' . $technology->Id . '</td>' . PHP_EOL;
        echo '<td>' . $technology->TechnologyName . '</td>' . PHP_EOL;
        switch ($technology->LinkUrl) {
            case 'tech-sound.php':
                echo '<td class="mid"><a href="sound_list.php?cat=' . $_REQUEST['cat'] . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
                break;
            case 'tech-light.php':
                echo '<td class="mid"><a href="light_list.php?cat=' . $_REQUEST['cat'] . '"><img src="img/edit-icon.png" /></a></td>' . PHP_EOL;
                break;
            case 'tech-standard.php':
                echo '<td class="mid">(<a href="technologyinfo_list.php?cat=' . $_REQUEST['cat'] . '&tech=' . $technology->Id . '">' . $objTechnologyInfo->getCountTechnologyInfoByTechnologyId($technology->Id) . '</a>)</td>' . PHP_EOL;
                break;
        }
        echo '<td class="mid"><img src="img/arrow-up-down.png" /></td>' . PHP_EOL;
        echo '<td class="mid"><a href="technology_admin.php?cat=' . $_REQUEST['cat'] . '&id=' . $technology->Id . '"><img src="img/edit-icon.png" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="technology_delete.php?cat=' . $_REQUEST['cat'] . '&id=' . $technology->Id . '"><img src="img/delete-icon.png" /></a></td>' . PHP_EOL;
        echo '</tr>' . PHP_EOL;
    }
    ?>
                    </tbody>
                </table>
    
            </div> <!-- layout -->
    
<?php 
}
<?php

include_once '../inc/classes/Technology.php';
$objTechnology = new Technology();
switch ($_REQUEST['item_id']) {
    case 'color-chk':
        $link_url = 'tech-color.php';
        break;
    case 'ibeacon-chk':
        $link_url = 'tech-ibeacon.php';
        break;
    case 'sound-chk':
        $link_url = 'tech-sound.php';
        break;
    case 'light-chk':
        $link_url = 'tech-light.php';
        break;
}
$oTechnology = $objTechnology->getAllTechnologyByCategoryIdLinkUrl($_REQUEST['category_id'], $link_url);
$objT = new Technology($oTechnology[0]->Id);
$objT->IsActive = $_REQUEST['item_value'];
$objT->Update();
echo 'success';
Ejemplo n.º 13
0
				<a href="javascript:void(0);" class="<?php 
if ($ip_tab) {
    echo 'active';
}
?>
">Intellectual <br>Property</a>
			</div>
		</div>
		<div class="technology-menu-items tab-1" style="<?php 
echo $tab1_style;
?>
">
			<div id="carousel-equipment" class="equipment-menu-items carousel slide" data-ride="carousel">
			 	<div class="carousel-inner" role="listbox">
					<?php 
$objTechnology = new Technology();
$oTechnology = $objTechnology->GetAllTechnologyByCategoryId($cat_id);
$iCnt = 6;
// Go ahead and set it to the max to kick of a new div
$iTotalInView = 6;
$cClass = ' active';
foreach ($oTechnology as $technology) {
    $iCnt++;
    if ($iCnt > $iTotalInView) {
        if ($cClass == '') {
            echo '</div>' . PHP_EOL;
        }
        echo '<div class="item' . $cClass . '">' . PHP_EOL;
        $iCnt = 1;
    }
    echo '<div class="technology-menu-item col-sm-4">' . PHP_EOL;
 public function sort()
 {
     $sort = explode(',', Input::get('sort'));
     if ($sort) {
         foreach ($sort as $key => $id) {
             $rank = Technology::find($id);
             $rank->sort = $key + 1;
             $rank->save();
         }
     }
 }
Ejemplo n.º 15
0
<?php

session_start();
if (!isset($_SESSION['sessCategory'])) {
    header('Location: index.php');
    exit;
}
include_once 'inc/classes/Technology.php';
include_once 'inc/classes/TechnologyInfo.php';
include_once 'inc/classes/TechnologyInfoImage.php';
include_once 'inc/classes/Category.php';
$objTechnology = new Technology($_REQUEST['id']);
$objTechnologyInfo = new TechnologyInfo();
$oTechnologyInfo = $objTechnologyInfo->getAllTechnologyInfoByTechnologyId($_REQUEST['id']);
$objTechnologyInfoImage = new TechnologyInfoImage();
$oTechnologyInfoImage = $objTechnologyInfoImage->GetAllTechnologyInfoImageByTechnologyInfoId($oTechnologyInfo[0]->Id);
$objCategory = new Category($_SESSION['sessCategory']);
$bgcolor = "#F40000";
// Coke red default
if ($objCategory->BackgroundColor != "") {
    $bgcolor = $objCategory->BackgroundColor;
}
$background = $bgcolor . " none repeat scroll 0% 0%";
// this is used in single-product-template.php
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Coke Cooler</title>
	<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
Ejemplo n.º 16
0
$unitsArr = $unitConn->getAllUnits();
foreach ($unitsArr as $unitArr) {
    $unitName = $terms[$unitArr[1]]->getString();
    $unitDescription = $terms[$unitArr[13]]->getString();
    $unit = new Unit($unitArr[0], $unitName, $unitArr[2], $unitArr[3], $unitArr[4], $unitArr[5], $unitArr[6], $unitArr[7], $unitArr[8], explode(",", $unitArr[9]), explode(",", $unitArr[10]), explode(",", $unitArr[11]), $unitArr[12], $unitDescription, $unitArr[14], $unitArr[15]);
    if (isset($battleModLinks[$unit->getId()])) {
        $unit->setBattleMods($battleModLinks[$unit->getId()]);
    }
    $units[$unit->getId()] = $unit;
}
$staticData->setUnits($units);
$technologiesArr = $technologyConn->getAllTechnologies();
foreach ($technologiesArr as $technologyArr) {
    $techName = $terms[$technologyArr[1]]->getString();
    $techDescription = $terms[$technologyArr[11]]->getString();
    $technology = new Technology($technologyArr[0], $techName, $technologyArr[2], $technologyArr[3], $technologyArr[4], explode(",", $technologyArr[5]), explode(",", $technologyArr[6]), $technologyArr[7], $technologyArr[8], $technologyArr[9], $technologyArr[10], $techDescription, $technologyArr[12]);
    $technologies[$technology->getId()] = $technology;
}
$staticData->setTechnologies($technologies);
$productionModsArr = $productionModConn->getAllProductionMods();
$productionModLinks = array();
foreach ($productionModsArr as $productionModArr) {
    $productionMod = new ProductionMod($productionModArr[0], $productionModArr[1], $productionModArr[2], $productionModArr[3], $productionModArr[4], $productionModArr[5], $productionModArr[6]);
    $productionMods[$productionMod->getId()] = $productionMod;
    if ($productionMod->getTargetClassId() == 'Building') {
        $productionModLinks[$productionMod->getTargetId()][] = $productionMod;
    }
}
$buildingsArr = $buildingConn->getAllBuildings();
foreach ($buildingsArr as $buildingArr) {
    $buildingName = $terms[$buildingArr[1]]->getString();