Example #1
0
 function init($mySql, $queries, $lang, $module, $idUrl)
 {
     $HelperOther = new HelperOther();
     $Details = new Details();
     $Action = new Action();
     $entry = $mySql->fetch_row($queries->selectById($mySql, $module, $idUrl));
     $getColumn = $queries->selectAll($mySql, $module);
     $layout = $Details->debut($lang, $module);
     for ($i = 0; $i < $mySql->num_fields($getColumn); $i++) {
         $column = $mySql->fetch_field($getColumn);
         $column = $column->name;
         $details = $entry[$i];
         if ($Action->exclusion($module, $column)) {
             $field = $HelperOther->findField($column);
             @(!(include_once 'controller/fields/' . $field . '.class.php'));
             if (class_exists($field)) {
                 $getValue = new $field($lang, $module, $details, $column, DETAIL);
                 $details = $getValue->details;
                 $layout .= $Details->detail($details);
             }
         }
     }
     $layout .= $Details->fin();
     return $layout;
 }
 public function display()
 {
     $details = new Details();
     if (isset($_POST['account'])) {
         $details->unsetLast();
         $accountID = $_POST['account'];
         unset($_POST['account']);
         $details->getDetails($accountID);
     } else {
         $details->init();
     }
     include 'view/layout/details.php';
 }
Example #3
0
 /**
  * @Route("/details/set", name="details")
  */
 public function setDetailsAction(Request $request)
 {
     //create details for user
     $user = $this->getUser();
     var_dump($user->getId());
     $details = new Details();
     $details->setUser($user);
     $details->setName('test');
     $em = $this->getDoctrine()->getManager();
     $em->persist($details);
     $em->flush();
     // dump($em);
     return $this->render('default/dev.html.twig');
 }
Example #4
0
 function init($module, $lang, $idURL, $categorie, $sscategorie, $type, $sort, $order, $page, $search)
 {
     $entry = Db::fetch_row(Query::selectById($idURL));
     $getColumn = Query::selectAll();
     $output = Details::debut($module, $lang, $categorie, $sscategorie, $idURL);
     for ($i = 0; $i < Db::num_fields($getColumn); $i++) {
         $column = Db::fetch_field($getColumn);
         $column = $column->name;
         $details = $entry[$i];
         $field = Utils::findField($column);
         @(!(include_once 'controller/fields/' . $field . '.class.php'));
         if (class_exists($field)) {
             if ($field == "date") {
                 $details = Utils::datefr($details);
             }
             $getValue = new $field($lang, $details, $column, $type);
             $details = $getValue->details;
             if ($this->exclusion($sscategorie, $column)) {
                 $output .= Details::detail($details);
             }
         }
     }
     $output .= Details::fin();
     return $output;
 }
Example #5
0
 function __construct($name)
 {
     Main::includeClass('Details');
     $details = Details::getDetails('at_crop', '*', array('name' => $name));
     Main::includeClass('DetailsData');
     $dd = new DetailsData($details, 'crop');
     $dd->single();
 }
Example #6
0
 function parse()
 {
     if (!empty($this->season)) {
         Main::includeClass('Details');
         $details = Details::getDetailsContains('at_crop', array('name', 'details'), array('climate' => $this->season));
         Main::includeClass('SeasonCalculatorData');
         Main::includeClass('TemplateData');
         $scd = new SeasonCalculatorData($details, $this->season);
         $td = new TemplateData($scd);
     } else {
         Main::includeClass('SeasonCalculatorForm');
         Main::includeClass('TemplateData');
         $scf = new SeasonCalculatorForm($details);
         $td = new TemplateData($scf);
     }
 }
Example #7
0
 function handle($section)
 {
     $page = "UpdateHome";
     $temp['cond'] = 'name';
     switch ($section) {
         case 'crop':
             $table = 'at_crop';
             $fields = array('name', 'sci_name', 'climate', 'soil', 'variaties', 'dur', 'diseases', 'bio_fert', 'market_price', 'details', 'type');
             $req = array('name', 'type');
             $page = 'CropData';
             $temp['cond'] = 'name';
             break;
         case 'office':
             $table = 'at_contact_info';
             $fields = array('name', 'type', 'code', 'number', 'district', 'location');
             $req = array('number', 'name', 'district');
             $page = 'ContactData';
             $temp['cond'] = 'name';
             break;
         case 'croptype':
             $table = 'at_crop';
             $fields = array('name', 'details');
             $req = array('name');
             $page = 'CropTypeData';
             $temp['cond'] = 'name';
             break;
         case 'news':
             $table = 'at_news';
             $fields = array('news', 'date', 'time');
             $req = array('news', 'date', 'time');
             $page = 'NewsData';
             $temp['cond'] = 'date';
             break;
         case 'map':
             $table = 'at_map';
             $fields = array('news', 'date', 'time');
             $req = array('news', 'date', 'time');
             $page = 'MapData';
             break;
         case 'magazine':
             $table = 'at_magazine';
             $fields = array('name', 'type', 'annual_price', 'single_price', 'lifetime_price');
             $req = array('name', 'type');
             $page = 'MagazineData';
             $temp['cond'] = 'name';
             break;
         case 'award':
             $table = 'at_awards';
             $fields = array('level', 'name', 'details', 'year');
             $req = array('name', 'level');
             $page = 'AwardsData';
             $temp['cond'] = 'name';
             break;
         case 'disease':
             $table = 'at_crop_disease';
             $fields = array('name', 'control');
             $req = array('name');
             $page = 'DiseaseData';
             $temp['cond'] = 'name';
             break;
         case 'location':
             $table = 'at_location';
             $fields = array('name', 'details', 'cli', 'soil', 'crops', 'landuse', 'geo_area', 'land_forest', 'land_sown', 'well_irrigated_area', 'tank_irrigated_area', 'other_irrigated_area', 'canal_irrigated_area', 'net_irrigated_area', 'gross_irrigated_area', 'type', 'district');
             $req = array('name', 'type');
             $page = 'LocationData';
             $temp['cond'] = 'name';
             break;
         case 'publication':
             $table = 'at_publication';
             $fields = array('title', 'year', 'author', 'publisher', 'price');
             $req = array('title');
             $page = 'PublicationData';
             $temp['cond'] = 'title';
             break;
         case 'link':
             $table = 'at_links';
             $fields = array('name', 'url', 'details');
             $req = array('name', 'url', 'details');
             $page = 'LinksData';
             $temp['cond'] = 'name';
             break;
         case 'biofert':
             $table = 'at_bio_fert';
             $fields = array('name', 'details', 'price');
             $req = array('name', 'details', 'price');
             $page = 'BioFertData';
             $temp['cond'] = 'name';
             break;
         case 'insurance':
             $table = 'at_crop_insurance';
             $fields = array('crop', 'no', 'age', 'premium', 'compensation');
             $req = array('crop', 'premium', 'compensation');
             $page = 'CropInsuranceData';
             $temp['cond'] = 'crop';
             break;
         case 'prevactivity':
             $table = 'at_prev_activity';
             $fields = array('year', 'activity', 'location');
             $req = array('year', 'activity', 'location');
             $page = 'PrevActivityData';
             $temp['cond'] = 'year';
             break;
         case 'patent':
             $table = 'at_patents';
             $fields = array('name', 'holders', 'year', 'no');
             $req = array('name', 'holders', 'no');
             $page = 'PatentsData';
             $temp['cond'] = 'name';
         case 'default':
             echo header("Location: " . Settings::SITEURL . "admin/");
     }
     Main::includeClass('Details');
     $det = new Details();
     if (isset($_POST['action']) && isset($_POST['update_name'])) {
         $name = $_POST['update_name'];
         $info = Main::getPostData($fields, $req);
         /*
         if($this->image)
         {
         	if(isset($_FILES['file']))
         	{
         		if($_FILES['file']['error']===UPLOAD_ERR_OK)
         		{
         			echo $_FILES['file']['error'];
         			Main::includeClass('UploadManager');
         			$file=Main::generateRandom();
         			$um=new UploadManager($file);
         			$info['image']=$file;
         		}
         	}
         }
         */
         $cond = array($temp['cond'] => $name);
         Main::includeClass('Update');
         $update = new Update($info, $table, $cond);
         echo header("Location:" . Settings::SITEURL . "{$this->section}/");
     } else {
         $name = $this->name;
         $cond = array($temp['cond'] => $name);
         $list = $det->getDetails($table, '*', $cond, FALSE);
         if (!empty($list)) {
             $list[0]['update'] = $name;
         }
         $i = 0;
         //print_r($list);
         foreach ($list as $data) {
             //print_r($data);
             //$keys=array_keys($data);
             //print_r($keys);
             foreach ($data as $key => $value) {
                 if (!isset($value)) {
                     $list[$i][$key] = '';
                 }
             }
             $i++;
         }
         //print_r($list);
         if (!empty($list)) {
             $list = $list[0];
         }
         $this->displayUpdate($page, $list);
     }
     //}
 }
Example #8
0
    function parse()
    {
        Main::includeClass('Details');
        $this->section = $this->comp['SECTION'];
        switch (strtolower($this->section)) {
            case 'crop':
                Main::includeClass('Details');
                $details = Details::getDetails('at_crop', array('name', 'details', 'image'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />
		<div class="heading-text">

		<h3>Crops</h3>
		<p>Crop List</p>

		</div>
		</div>';
                break;
            case 'croptype':
                Main::includeClass('Details');
                $details = Details::getDetails('at_crop_types', array('name', 'details'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Crops</h3>
		<p>Crop List</p>

		</div>
		</div>';
                break;
            case 'map':
                if (key_exists('SUBCATEGORY', $this->comp)) {
                    $district = $this->comp['CATEGORY'];
                    $location = $this->comp['SUBCATEGORY'];
                    $details = Details::getDetails('at_map', array('name', 'details'), array('district' => $district, 'location' => $location));
                } else {
                    if (key_exists('CATEGORY', $this->comp)) {
                        $district = $this->comp['CATEGORY'];
                        $details = Details::getDetails('at_map', array('location'), array('location' => $location));
                        if (empty($details)) {
                            $this->content = array("Error" => "No Data Found");
                        } else {
                            $info = array();
                            $i = 0;
                            foreach ($details as $det) {
                                $info['name'] = $det['location'];
                            }
                            $this->content = $info;
                        }
                    } else {
                        $details = Details::getDetails('at_map', array('district'));
                        if (empty($details)) {
                            $this->content = array("Error" => "No Data Found");
                        } else {
                            $info = array();
                            $i = 0;
                            foreach ($details as $det) {
                                $info['name'] = $det['district'];
                            }
                            $this->content = $info;
                        }
                    }
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Maps</h3>
		<p>Map List</p>

		</div>
		</div>';
                break;
            case 'office':
                //Main::includeClass('Contact');
                if (key_exists('SUBCATEGORY', $this->comp)) {
                    $location = $this->comp['SUBCATEGORY'];
                    $district = $this->comp['CATEGORY'];
                    $details = Details::getDetails('at_contact_info', array('name'), array('location' => $location, 'district' => $district));
                    if (empty($details)) {
                        $this->content = array("Error" => "No Data Found");
                    } else {
                        $this->content = $details;
                    }
                    break;
                } else {
                    if (key_exists('CATEGORY', $this->comp)) {
                        $district = $this->comp['CATEGORY'];
                        $details = Details::getDetails('at_contact_info', array('location'), array('district' => $district));
                        if (empty($details)) {
                            $this->content = array("Error" => "No Data Found");
                        } else {
                            $info = array();
                            $i = 0;
                            foreach ($details as $det) {
                                $info[$i]['name'] = $det['location'];
                            }
                            $this->content = $info;
                        }
                    } else {
                        $details = Details::getDetails('at_contact_info', 'district');
                        if (empty($details)) {
                            $this->content = array("Error" => "No Data Found");
                        } else {
                            $info = array();
                            $i = 0;
                            foreach ($details as $det) {
                                $info[$i]['name'] = $det['district'];
                            }
                            $this->content = $info;
                        }
                    }
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Offices</h3>
		<p>Office List</p>

		</div>
		</div>';
                break;
            case 'prevactivity':
                Main::includeClass('Details');
                if (!key_exists('CATEGORY', $this->comp)) {
                    $details = Details::getDetails('at_prev_activity', 'location', NULL, FALSE);
                    if (empty($details)) {
                        $this->content = array('Error' => "No Data Found");
                    } else {
                        $info = array();
                        $i = 0;
                        foreach ($details as $det) {
                            $info[$i]['name'] = $det['location'];
                            if (isset($det['activity'])) {
                                $info[$i]['details'] = $det['activity'];
                            }
                            $i++;
                        }
                        $this->content = $info;
                    }
                } else {
                    $location = $this->comp['CATEGORY'];
                    $details = Details::getDetails('at_prev_activity', 'year', NULL, FALSE);
                    if (empty($details)) {
                        $this->content = array("Error" => "No Data Found");
                    } else {
                        $info = array();
                        $i = 0;
                        foreach ($details as $det) {
                            $info[$i]['name'] = $det['year'];
                            $i++;
                        }
                        $this->content = $info;
                    }
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Previous Year Activity</h3>
		<p></p>

		</div>
		</div>';
                break;
            case 'awards':
                Main::includeClass('Details');
                $details = Details::getDetails('at_awards', array('name', 'details'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Awards</h3>
		<p>Awards List</p>

		</div>
		</div>';
                break;
            case 'biofert':
                Main::includeClass('Details');
                $details = Details::getDetails('at_bio_fert', array('name', 'details'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Bio Fertilizer</h3>
		<p>Bio Fertilizer List</p>

		</div>
		</div>';
                break;
            case 'disease':
                Main::includeClass('Details');
                $details = Details::getDetails('at_crop_disease', array('name', 'details'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Disease</h3>
		<p>Disease List</p>

		</div>
		</div>';
                break;
            case 'insurance':
                Main::includeClass('Details');
                $details = Details::getDetails('at_crop_insurance', array('crop'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Crops Insurance</h3>
		<p>Insured Crops List</p>

		</div>
		</div>';
                break;
            case 'links':
                Main::includeClass('Details');
                $details = Details::getDetails('at_links', array('name', 'details'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>UseFull Links</h3>
		<p>Links List</p>

		</div>
		</div>';
                break;
            case 'location':
                Main::includeClass('Details');
                $details = Details::getDetails('at_location', array('name', 'details', 'image'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Location</h3>
		<p>Location List</p>

		</div>
		</div>';
                break;
            case 'magazine':
                Main::includeClass('Details');
                $details = Details::getDetails('at_magazine', array('name'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Magazine</h3>
		<p>Magazine List</p>

		</div>
		</div>';
                break;
            case 'news':
                Main::includeClass('Details');
                $details = Details::getDetails('at_news', array('title', 'news'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    foreach ($details as $data) {
                        $info = $data;
                    }
                    $this->content[0] = array('name' => $info['title'], 'details' => $info['news']);
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>News</h3>
		<p>News</p>

		</div>
		</div>';
                break;
            case 'patents':
                Main::includeClass('Details');
                $details = Details::getDetails('at_patents', array('name'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    $this->content = $details;
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Patents</h3>
		<p>Patents List</p>

		</div>
		</div>';
                break;
            case 'publication':
                Main::includeClass('Details');
                $details = Details::getDetails('at_publication', array('title'), NULL, FALSE);
                if (empty($details)) {
                    $this->content = array("Error" => "No Data Found");
                } else {
                    if (isset($details['title'])) {
                        $this->content[0]['name'] = $details['title'];
                    }
                }
                $this->banner = '<div id="page-heading"> <img src="' . Settings::SITEURL . 'images/page-heading1.jpg" alt="" />

		<div class="heading-text">

		<h3>Publications</h3>
		<p>Publication List</p>

		</div>
		</div>';
                break;
        }
    }
Example #9
0
 function parse()
 {
     Main::includeClass('Details');
     $section = $this->comp['SECTION'];
     $this->section = $section;
     switch (strtolower($section)) {
         case 'crop':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_crop', '*', array('name' => $name));
             $this->banner = '<div id="page-heading"> <img src="http://localhost/images/page-heading1.jpg" alt="" /><div class="heading-text"><h3>Crop</h3><p>' . ucfirst($this->name) . '  Details</p><</div></div>';
             if (empty($details)) {
                 $this->setContentEmpty();
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Scientific_Name'] = $det['sci_name'];
                     $this->content['Climate'] = str_replace('=:=', '<br />', $det['climate']);
                     $this->content['Soil'] = $det['soil'];
                     $this->content['Varieties'] = $det['variaties'];
                     $this->content['Duration'] = $det['dur'];
                     $this->content['Diseases'] = $det['diseases'];
                     $this->content['Bio_Fertilizer'] = $det['bio_fert'];
                     $this->content['Market_Price'] = $det['market_price'];
                     $this->content['Crop_Details'] = $det['details'];
                     $this->content['Crop_Type'] = $det['type'];
                     $this->content['image'] = $det['image'];
                     $this->content['Pests'] = $det['pests'];
                 }
                 /*
                 $name=$det['name'];
                 $type=$det['type'];
                 $side=Details::getDetails('at_crop','name',array('type'=>$type));
                 if(!empty($side))
                 {
                 	$count=0;
                 	foreach($side as $n)
                 	{
                 		if($n!==$name)
                 		{
                 			$this->sideBar[]="<li class='cat-item cat-item-1'><a href='".Settings::SITEURL."crop\\$n' title='$n'>$n</a></li>";
                 		}
                 	}
                 }
                 */
             }
             break;
         case 'awards':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_awards', '*', array('name' => $name));
             if (empty($details)) {
                 $this->setContentEmpty();
             } else {
                 foreach ($details as $det) {
                     $this->content['Level'] = $det['level'];
                     $this->content['Name'] = $det['name'];
                     $this->content['Details'] = $det['details'];
                     $this->content['Year'] = $det['year'];
                 }
                 /*
                 $name=$det['name'];
                 $level=$det['level'];
                 $side=Details::getDetails('at_crop','name',array('level'=>$type));
                 if(!empty($side))
                 {
                 	$count=0;
                 	foreach($side as $n)
                 	{
                 		if($n!==$name)
                 		{
                 			$this->sideBar[]="<li class='cat-item cat-item-1'><a href='".Settings::SITEURL."awards\\$n' title='$n'>$n</a></li>";
                 		}
                 	}
                 }
                 else
                 {
                 
                 }
                 */
             }
             break;
         case 'biofert':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_bio_fert', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Details'] = $det['details'];
                     $this->content['Price'] = $det['price'];
                 }
             }
             break;
         case 'office':
             $district = $this->comp['CATEGORY'];
             $location = $this->comp['SUBCATEGORY'];
             $name = str_replace("%20", " ", $this->comp['QUERY']);
             $details = Details::getDetails('at_contact_info', '*', array('name' => $name, 'location' => $location, 'district' => $district));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Code'] = $det['code'];
                     $this->content['Number'] = $det['number'];
                     $this->content['District'] = $det['district'];
                     $this->content['Location'] = $det['location'];
                     $this->content['image'] = $det['image'];
                 }
             }
             break;
         case 'disease':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_crop_disease', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Control'] = $det['control'];
                     $this->content['Details'] = $det['details'];
                 }
             }
             break;
         case 'insurance':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_crop_insurance', '*', array('crop' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Crop'] = $det['crop'];
                     $this->content['Number/Quantity Required '] = $det['no'];
                     $this->content['Age Of Crop'] = $det['age'];
                     $this->content['Premium'] = $det['premium'];
                     $this->content['Compensation'] = $det['compensation'];
                 }
             }
             break;
         case 'croptype':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_crop_types', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Details'] = $det['details'];
                 }
             }
             break;
         case 'links':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_links', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Link'] = $det['link'];
                     $this->content['Details'] = $det['details'];
                 }
             }
             break;
         case 'location':
             if (key_exists('SUBCATEGORY', $this->comp)) {
                 $district = $this->comp['CATEGORY'];
                 $location = $this->comp['SUBCATEGORY'];
                 $details = Details::getDetails('at_location', '*', array('name' => $location, 'district' => $district));
             } else {
                 if (key_exists('CATEGORY', $this->comp)) {
                     $district = $this->comp['CATEGORY'];
                     $details = Details::getDetails('at_location', '*', array('name' => $district, 'type' => 'district'));
                 }
             }
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Details'] = $det['details'];
                     $this->content['Soil'] = $det['soil'];
                     $this->content['Crops'] = $det['crops'];
                     $this->content['Land_Use'] = $det['landuse'];
                     $this->content['Geographical_Area'] = $det['geo_area'];
                     $this->content['Land_Forest'] = $det['land_forest'];
                     $this->content['Land_Sown'] = $det['land_sown'];
                     $this->content['Well_Irrigated_Area'] = $det['well_irrigated_area'];
                     $this->content['Canal_Irrigated_Area'] = $det['canal_irrigated_area'];
                     $this->content['Other_Irrigated_Area'] = $det['other_irrigated_area'];
                     $this->content['Net_Irrigated_Area'] = $det['net_irrigated_area'];
                     $this->content['Gross_Irrigated_Area'] = $det['gross_irrigated_area'];
                     $this->content['image'] = $det['image'];
                     $this->content['District'] = $det['district'];
                 }
             }
             break;
         case 'magazine':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_magazine', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array('Error' => 'No Data Found');
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Annual_Price'] = $det['annual_price'];
                     $this->content['Single_Price'] = $det['single_price'];
                     $this->content['LifeTime_Price'] = $det['lifetime_price'];
                 }
             }
             break;
         case 'map':
             $details = Details::getDetails('at_map', '*', array('type' => $type, 'name' => $this->name, 'LOCID' => $locID));
             if (empty($details)) {
                 $this->content = array("Error" => "No Data Found");
             } else {
                 foreach ($details as $det) {
                     $this->content['Map'] = $det['type'];
                     $this->content['Name'] = $det['name'];
                     $this->content['image'] = $det['image'];
                     $location = Details::getDetails('at_location', 'name', array('ID' => $det['LOCID']));
                     $this->content['Location'] = $location[0]['name'];
                     $this->content['Details'] = $det['details'];
                 }
             }
             break;
         case 'news':
             $title = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_news', '*', array('title' => $title));
             if (empty($details)) {
                 $this->content = array("Error" => "No Data Found");
             } else {
                 foreach ($details as $det) {
                     $this->content['title'] = $det['title'];
                     $this->content['news'] = $det['news'];
                     $this->content['date'] = $det['date'];
                     $this->content['time'] = $det['time'];
                 }
             }
             break;
         case 'patents':
             $name = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_patents', '*', array('name' => $name));
             if (empty($details)) {
                 $this->content = array("Error" => "No Data Found");
             } else {
                 foreach ($details as $det) {
                     $this->content['Name'] = $det['name'];
                     $this->content['Year'] = $det['year'];
                     $this->content['Holders'] = $det['holders'];
                     $this->content['Patent Number'] = $det['no'];
                     $this->content['Details'] = $det['details'];
                 }
             }
             break;
         case 'prevactivity':
             $year = $this->comp['SUBCATEGORY'];
             $location = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_prev_activity', '*', array('year' => $year, 'location' => $location));
             if (empty($details)) {
                 $this->content = array("Error" => "No Data Found");
             } else {
                 foreach ($details as $det) {
                     $this->content['Year'] = $det['year'];
                     $this->content['Activity'] = $det['activity'];
                     $this->content['Location'] = $det['location'];
                 }
             }
             break;
         case 'publication':
             $title = $this->comp['CATEGORY'];
             $details = Details::getDetails('at_publication', '*', array('title' => $title));
             if (empty($details)) {
                 $this->content = array("Error" => "No Data Found");
             } else {
                 foreach ($details as $det) {
                     $this->content['Title'] = $det['title'];
                     $this->content['Year'] = $det['year'];
                     $this->content['Author'] = $det['author'];
                     $this->content['Publisher'] = $det['publisher'];
                     $this->content['Price'] = $det['price'];
                 }
             }
             break;
     }
 }
Example #10
0
    function content()
    {
        ?>
		<div id='conctactleft'>
				<h4><?php 
        echo "{$this->section} Contact";
        ?>
</h4>
		<div class='success-message'>
			<?php 
        echo "Contact {$this->section}ed Successfully";
        ?>
		</div>
		<div id='maincontactform'>
		<form name='<?php 
        echo $this->formName;
        ?>
' id='contactForm' method='post' action='' enctype="multipart/form-data" >
				<div>
					<label for='name'>Name</label>
					<input type='text' name='name' id='name' class='textfield' value='<?php 
        echo $this->info['name'];
        ?>
' />
					<span class="require"> *</span>
					<label for='Type'>Select Type</label>
					<select name='type' id='type' class='selectfield'>
					<option value='mobile'
					<?php 
        if ($this->info['type'] == 'mobile') {
            echo ' selected="TRUE"';
        }
        ?>
					>Mobile</option>
					<option value='office'
					<?php 
        if ($this->info['type'] == 'office') {
            echo ' selected="TRUE"';
        }
        ?>
					>Office</option>
					</select>
					<span class="require"> *</span>

					<label for='code'>Area Code</label>
					<input type="text" name='code' id='code' class='textfield' value='<?php 
        echo $this->info['code'];
        ?>
' />
					<span class="require"> *</span>
					<label for='number'>Number</label>
					<input type='text' name='number' id='number' class='textfield' value='<?php 
        echo $this->info['number'];
        ?>
' />
					<span class="require"> *</span>
					<label for='district'>District</label>
					<select name='district' id='district' class='selectfield'>
					<?php 
        Main::includeClass('Details');
        $det = Details::getDetails('at_location', 'name', array('type' => 'district'), TRUE);
        if (is_array($det) && !empty($det)) {
            foreach ($det as $value) {
                if ($this->info['district'] == $value) {
                    echo "<option value='{$value}' selected='selected'>{$value}</option>";
                } else {
                    echo "<option value='{$value}'>{$value}</option>";
                }
            }
        } else {
            echo "<option value=''>None</option>";
        }
        ?>
					</select>
					<span class="require"> *</span>
					<label for='location'>Location</label>
					<select name='location' id='location' class='selectfield'>
					<?php 
        Main::includeClass('Details');
        $det = Details::getDetails('at_location', 'name', array('type' => 'village'), TRUE);
        if (is_array($det) && !empty($det)) {
            foreach ($det as $value) {
                if ($this->info['location'] == $value) {
                    echo "<option value='{$value}' selected='selected'>{$value}</option>";
                } else {
                    echo "<option value='{$value}'>{$value}</option>";
                }
            }
        } else {
            echo "<option value=''>None</option>";
        }
        ?>
					</select>
					<span class="require"> *</span>
					<label for='imageAdd'>Add Image</label>
					<input type="file" name='file' id='file'/>
					<div class='clear'></div>
					<?php 
        //echo '<a href="#" class="button" id="contactSend"><span>'.$this->section.'</span></a> <span class="loading" style="display: none;">Please wait..</span>';
        if ($this->section == 'Update') {
            echo "<input type='hidden' name='update_name' value='{$this->info['update']}' />";
        }
        ?>
					<input type="submit" name="action" value='Add Contact' class='button'/>
				</div>
			</form>
		</div>
	</div>
		<?php 
    }
Example #11
0
<?php

/*
	Type:
		0: views
			1: gt search
			2: character select
			3: light calculation
			4: infusion calculation
			5: analytic views
			6: complex infusion
	Acct:
		0: no acct
			1: XBL
			2: PSN
*/
include_once '../classes/database.php';
include_once '../classes/details.php';
$type = $_GET['type'];
if (isset($_POST['acct'])) {
    $acct = $_POST['acct'];
} else {
    $acct = 0;
}
if (isset($_POST['gt'])) {
    $gt = $_POST['gt'];
} else {
    $gt = "";
}
Details::insert($type, $acct, $gt);
echo json_encode(array('status' => true));
Example #12
0
    function content()
    {
        ?>
			<div id='conctactleft'>
				<h4><?php 
        echo "{$this->section} Insurance";
        ?>
</h4>
		<div class='success-message'>
			<?php 
        echo "Insurance {$this->section}ed Successfully";
        ?>
		</div>
		<div id='maincontactform'>
			<form name='<?php 
        echo $this->formName;
        ?>
' id='insuranceForm' method='post' action=''>
				<div>
					<label for='crop'>Crop</label>
					<select name='crop' id='crop' class='selectfield'>
						<?php 
        Main::includeClass('Details');
        $det = Details::getDetails('at_crop', 'name', NULL, TRUE);
        if (is_array($det) && !empty($det)) {
            foreach ($det as $data) {
                echo "<option value={$data}>{$data}</option>";
            }
        } else {
            echo "<option value=''>None</option>";
        }
        ?>
					</select>
					<span class="require"> *</span>
					<label for="no">Number</label>
					<input type="text" name="no" id="no" class='textfield' value='<?php 
        echo $this->info['no'];
        ?>
' />
					<span class="require"> *</span>
					<label for="age">Age</label>
					<input type="text" name="age" id="age" class='textfield' value='<?php 
        echo $this->info['age'];
        ?>
' />
					<label for='premium'>Premium</label>
					<input type="text" name='premium' id='premium' class='textfield'value='<?php 
        echo $this->info['premium'];
        ?>
' />
					<span class="require"> *</span>
					<label for='compensation'>Compensation</label>
					<input type='text' name='compensation' id='compensation' class='textfield' value='<?php 
        echo $this->info['compensation'];
        ?>
' />
					<span class="require"> *</span>
					<div class='clear'></div>
					<?php 
        if ($this->section == 'Update') {
            echo "<input type='hidden' name='update_name' id='update_name' value='{$this->info['update']}' />";
        }
        ?>
					<input type="submit" name="action" value="Add Insurance" class='button' />
				</div>
			</form>
		</div>
	</div>
		<?php 
    }
<?php

include_once '../classes/details.php';
if ($_GET['r'] == 'getCounts') {
    $response = array('t' => Details::getTotalCounts(), 'm' => Details::getMonthlyCounts(), 'w' => Details::getWeeklyCounts(), 'd' => Details::getDailyCounts());
    echo json_encode($response);
} else {
    if ($_GET['r'] == 'getPlatformData') {
        $gtdata = Details::getAcctStats(1);
        $chardata = Details::getAcctStats(2);
        $lightdata = Details::getAcctStats(3);
        $response = array('gt' => $gtdata, 'char' => $chardata, 'light' => $lightdata);
        echo json_encode($response);
    }
}
Example #14
0
    function content()
    {
        ?>
		<div id='conctactleft'>
				<h4><?php 
        echo "{$this->section} Crop";
        ?>
</h4>
		<div class='success-message'>
			<?php 
        echo "Crop {$this->section}ed Successfully";
        ?>
		</div>
		<div id='maincontactform'>
			<form name='<?php 
        echo $this->formName;
        ?>
' id='cropForm' method='post' action='' enctype="multipart/form-data">
				<div>
					<label for='name'>Name</label>
					<input type='text' name='name' id='name' class='textfield' value='<?php 
        echo $this->info['name'];
        ?>
' />
					<span class="require"> *</span>
					<label for="sci_name">Scientific Name</label>
					<input type="text" name="sci_name" id="sci_name" class='textfield' value='<?php 
        echo $this->info['sci_name'];
        ?>
' />
					<span class="require"> *</span>
					<label for="climate">Climate</label>
					<select name='climate[]' id='climate' class='selectfield' multiple='multiple'>
						<option value='summer'>Summer</option>
						<option value='winter'>Winter</option>
						<option value='spring'>Spring</option>
						<option value='autumn'>Autumn</option>
					</select>
					<label for='soil'>Soil Types</label>
					<textarea name='soil' id='soil' class='textarea'><?php 
        echo $this->info['soil'];
        ?>
</textarea>
					<span class="require"> *</span>
					<label for='variaties'>Variaties</label>
					<textarea name='variaties' id='variaties' class='textarea'><?php 
        echo $this->info['variaties'];
        ?>
</textarea>
					<span class="require"> *</span>
					<label for='dur'>Duration</label>
					<input type='text' name='dur' id='dur' class='textfield' value='<?php 
        echo $this->info['dur'];
        ?>
' />
					<label for='diseases'>Diseases</label>
					<textarea name='diseases' id='diseases' class='textarea'><?php 
        echo $this->info['diseases'];
        ?>
</textarea>
					<span class="require"> *</span>
					<label for='bio_fert'>Bio Fertilizers</label>
					<?php 
        Main::includeClass('Details');
        $det = Details::getDetails('at_bio_fert', 'name', NULL, TRUE);
        if (empty($det) || !is_array($det)) {
            echo "<select name='bio_fert' id='bio_fert' class='selectfield'>";
            echo '<option value="">None</option>';
        } else {
            echo "<select multiple='multiple' name='bio_fert[]' id='bio_fert' class='selectfield'>";
            foreach ($det as $val) {
                if (in_array($val, $this->info['bio_fert'])) {
                    echo "<option value='{$val}' selected='true'>{$val}</option>";
                } else {
                    echo "<option value='{$val}'>{$val}</option>";
                }
            }
        }
        ?>
					</select>
					<label for='market_price'>Market Price</label>
					<input type='text' name='market_price' id='market_price' class='textfield' value='<?php 
        echo $this->info['market_price'];
        ?>
' />
					<span class="require"> *</span>
					<label for="details">Details</label>
					<textarea name='details' id='details' class='textarea'><?php 
        echo $this->info['details'];
        ?>
</textarea>
					<span class="require"> *</span>
					<label for="type">Crop Type</label>
					<select name='type' id='type' class='selectfield'>
					<?php 
        $det = Details::getDetails('at_crop_types', 'name', NULL, TRUE);
        if (empty($det)) {
            echo '<option value="">None</option>';
        } else {
            if (is_array($det)) {
                foreach ($det as $val) {
                    if ($this->type == $val) {
                        echo "<option value='{$val}' selected='selected'>{$val}</option>";
                    } else {
                        echo "<option value='{$val}'>{$val}</option>";
                    }
                }
            } else {
                if ($this->type == $det) {
                    echo "<option value='{$det}' selected='selected'>{$det}</option>";
                } else {
                    echo "<option value='{$det}'>{$det}</option>";
                }
            }
        }
        ?>
					</select>
					<span class="require"> *</span>
					<label for='pests'>Pests</label>
					<?php 
        $det = Details::getDetails('at_crop_pests', 'name', NULL, TRUE);
        if (empty($det) || !is_array($det)) {
            echo "<select name='pests' id='pests' class='selectfield'>";
            echo '<option value="">None</option>';
        } else {
            echo "<select multiple='multiple' name='pests[]' id='pest' class='selectfield'>";
            foreach ($det as $val) {
                if (in_array($val, $this->info['pests'])) {
                    echo "<option value='{$val}' selected='true'>{$val}</option>";
                } else {
                    echo "<option value='{$val}'>{$val}</option>";
                }
            }
        }
        ?>
					<label for="file">Crop Image</label>
					<input type="file" name="file" id="file" />
					<input type="hidden" name="image" id='image' value='' />
					<div class='clear'></div>
					<?php 
        //echo '<a href="#" class="button" id="cropsend"><span>'.$this->section.'</span></a> <span class="loading" style="display: none;">Please wait..</span>';
        if ($this->section == 'Update') {
            echo "<input type='hidden' name='update_name' id='update_name' value='{$this->info['update']}' />";
        }
        ?>
					<input type="submit" name="action" class='button' value='Add Crop' />
				</div>
			</form>
		</div>
	</div>
	<?php 
    }
Example #15
0
 public function actionDetails()
 {
     Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . "/css/account-details.css");
     Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . "/js/account-details.js", CClientScript::POS_END);
     $getPassForm = false;
     $status = false;
     $msg = '';
     if (Yii::app()->request->isPostRequest) {
         $getPassForm = (bool) Yii::app()->request->getParam('passForm', false);
         if ($getPassForm) {
             $getPassword = Yii::app()->request->getParam('password', false);
             $getNewPassword = Yii::app()->request->getParam('newPassword', false);
             if (md5($getPassword) == Yii::app()->user->getInfo('password')) {
                 if ($getNewPassword[0] == $getNewPassword[1]) {
                     $model = Yii::app()->user->getModel();
                     $model->password = md5($getNewPassword);
                 } else {
                     $msg = "New passwords don't match";
                 }
             } else {
                 $msg = 'Current Password is wrong';
             }
         } else {
             $getIban = Yii::app()->request->getParam('iban', '');
             $getBic = Yii::app()->request->getParam('bic', '');
             $getCard_number = Yii::app()->request->getParam('card_number', '');
             $getCard_name = Yii::app()->request->getParam('card_name', '');
             $getCard_exp_month = Yii::app()->request->getParam('card_exp_month', '');
             $getCard_exp_year = Yii::app()->request->getParam('card_exp_year', '');
             $getBillingAddress = Yii::app()->request->getParam('billing_address', '');
             $model = Details::model()->find('created_by = ' . Yii::app()->user->getInfo());
             if ($model == null) {
                 $model = new Details();
                 $model->created_by = Yii::app()->user->getInfo();
             }
             $model->iban = $getIban;
             $model->bic = $getBic;
             $model->card_number = $getCard_number;
             $model->card_name = $getCard_name;
             $model->card_exp_month = $getCard_exp_month;
             $model->card_exp_year = $getCard_exp_year;
             $model->billing_address = $getBillingAddress;
         }
         if (isset($model)) {
             if ($model->save()) {
                 $status = true;
                 $msg = 'Successfully Updated';
             } else {
                 foreach ($model->getErrors() as $errors) {
                     foreach ($errors as $error) {
                         $msg .= $error;
                     }
                 }
             }
         }
     }
     $model = Details::model()->find('created_by = ' . Yii::app()->user->getInfo());
     $this->render('details', array('msg' => $msg, 'status' => $status, 'model' => $model, 'getPassForm' => $getPassForm));
 }
 /**
  * returns additional url params for dynamic url building
  *
  * @return string
  */
 public function getDynUrlParams()
 {
     $sParams = parent::getDynUrlParams();
     if ($sCnId = oxRegistry::getConfig()->getRequestParameter('cnid')) {
         $sParams .= "&amp;cnid={$sCnId}";
     }
     if ($sAnId = oxRegistry::getConfig()->getRequestParameter('anid')) {
         $sParams .= "&amp;anid={$sAnId}";
     }
     if ($sListType = oxRegistry::getConfig()->getRequestParameter('listtype')) {
         $sParams .= "&amp;listtype={$sListType}";
     }
     // @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
     if ($sRecommId = oxRegistry::getConfig()->getRequestParameter('recommid')) {
         $sParams .= "&amp;recommid={$sRecommId}";
     }
     // END deprecated
     return $sParams;
 }
 function handle($components)
 {
     $list = FALSE;
     switch (strtolower($components['CATEGORY'])) {
         case 'crop':
             $table = 'at_crop';
             if (key_exists('SUBCATEGORY', $components)) {
                 $name = $components['SUBCATEGORY'];
                 $list = FALSE;
                 $data = '*';
             } else {
                 $name = NULL;
                 $list = TRUE;
                 $data = array('name', 'type');
             }
             $temp['cond'] = 'name';
             $page = 'CropDetails';
             break;
         case 'links':
             $table = 'at_links';
             if (key_exists('SUBCATEGORY', $components)) {
                 $name = $components['SUBCATEGORY'];
                 $list = FALSE;
                 $data = '*';
             } else {
                 $name = NULL;
                 $list = TRUE;
                 $data = array('name', 'details');
             }
             $temp['cond'] = 'name';
             $page = 'LinkDetails';
             break;
         case 'awards':
             $table = 'at_awards';
             if (key_exists('SUBCATEGORY', $components)) {
                 $name = $components['SUBCATEGORY'];
                 $list = FALSE;
                 $data = '*';
             } else {
                 $name = NULL;
                 $list = TRUE;
                 $data = array('name', 'details');
             }
             $temp['cond'] = 'name';
             $page = 'LinkDetails';
             break;
         default:
             $page = 'HomePageData';
     }
     Main::includeClass('Details');
     $det = new Details();
     if (isset($name)) {
         $cond = array($temp['cond'] => $name);
     } else {
         $cond = NULL;
     }
     if (isset($table)) {
         $details = $det->getDetails($table, $data, $cond, $list);
     } else {
         $details = NULL;
     }
     $this->display($page, $details, $list);
 }
Example #18
0
    function sideBar()
    {
        ?>
		<div class="sidebar">
          <div class="sidebartop"></div>
          <div class="sidebarmain">
            <div id="searchbox_widget-7" class="sidebarcontent widget_searchbox_widget">
              <h4 class="sidebarheading">Search</h4>
              <div class="searchbox">
                <form method="get" id="search" action="/?section='crop'">
                  <div>
                    <input type="text" class="searchinput" value="Search Map(s)..." onblur="if (this.value == ''){this.value = 'Search Map(s)...'; }" onfocus="if (this.value == 'Search Map(s)...') {this.value = ''; }"   name="s" id="s"/>
                    <input type="submit" class="searchsubmit" value=""/>
                  </div>
                </form>
              </div>
              <div class="clear"></div>
            </div>
          </div>
          <div class="sidebarbottom"></div>
        </div>
        <?php 
        if (isset($this->content['Crop_Type'])) {
            ?>
          <div class="sidebar">
          <div class="sidebartop"></div>
          <div class="sidebarmain">
            <div id="categories-2" class="sidebarcontent widget_categories">
              <h4 class="sidebarheading">Related Crops</h4>
              <ul>
                <?php 
            $crops = Details::getDetails('at_crop', 'name', array('type' => $this->content['Crop_Type']));
            if (empty($crops)) {
                echo "No Related Crops Of Type {$this->content['Crop_Type']} Found";
            } else {
                $count = 0;
                foreach ($crops as $info) {
                    if ($info['name'] !== $this->content['Name']) {
                        echo '<li class="cat-item cat-item-1"><a href="' . Settings::SITEURL . 'crop\\' . $info['name'] . '">' . $info['name'] . "</a></li>";
                        $count += 1;
                    }
                }
                if (!$count) {
                    echo "<p>No Related Crop(s) Found</p>";
                }
            }
            ?>
              </ul>
            </div>
          </div>
          <div class="sidebarbottom"></div>
        </div>
    <?php 
        }
    }
Example #19
0
 function parse()
 {
     $field = 'name';
     $table = 'at_crop';
     $get = array('name', 'details');
     switch (strtolower($this->section)) {
         case 'crop':
             $table = 'at_crop';
             break;
         case 'awards':
             $table = 'at_awards';
             break;
         case 'biofert':
             $table = 'at_bio_fert';
             break;
         case 'contact':
             $table = 'at_contact_info';
             $field = 'location';
             $get = array('name', 'location');
             break;
         case 'crop':
             $table = 'at_crop';
             break;
         case 'disease':
             $table = 'at_crop_disease';
             break;
         case 'insurance':
             $table = 'at_crop_insurance';
             $field = 'crop';
             $get = 'crop';
             break;
         case 'croptype':
             $table = 'at_crop_types';
             break;
         case 'links':
             $table = 'at_links';
             break;
         case 'location':
             $table = 'at_location';
             break;
         case 'magazine':
             $table = 'at_magazine';
             $get = 'name';
             break;
         case 'map':
             $table = 'at_map';
             break;
         case 'news':
             $table = 'at_news';
             $get = array('title', 'news');
             $field = 'title';
             break;
         case 'patent':
             $table = 'at_patents';
             break;
         case 'prevactivity':
             $table = 'at_prev_activity';
             $get = array('location', 'activity');
             $field = 'location';
             break;
         case 'publication':
             $table = 'at_publication';
             $get = array('title', 'publisher');
             $field = 'title';
     }
     Main::includeClass('Details');
     $details = array();
     $details = Details::getDetails($table, $get, array($field => $this->query), FALSE, TRUE);
     $this->display($details);
 }
Example #20
0
 public static function deleteDetails(Details $details)
 {
     $pdo = Database::getInstance()->prepare('DELETE FROM details WHERE idDetail=:idDetail ');
     $pdo->bindValue(':idDetail', $details->getIdDetail());
     $pdo->execute();
 }
Example #21
0
 /**
  * returns additional url params for dynamic url building
  *
  * @return string
  */
 public function getDynUrlParams()
 {
     $sParams = parent::getDynUrlParams();
     if ($sCnId = oxRegistry::getConfig()->getRequestParameter('cnid')) {
         $sParams .= "&amp;cnid={$sCnId}";
     }
     if ($sAnId = oxRegistry::getConfig()->getRequestParameter('anid')) {
         $sParams .= "&amp;anid={$sAnId}";
     }
     if ($sListType = oxRegistry::getConfig()->getRequestParameter('listtype')) {
         $sParams .= "&amp;listtype={$sListType}";
     }
     if ($sRecommId = oxRegistry::getConfig()->getRequestParameter('recommid')) {
         $sParams .= "&amp;recommid={$sRecommId}";
     }
     return $sParams;
 }
Example #22
0
 public function testGetIdentifier()
 {
     $this->assertEquals(3, $this->object->getIdentifier());
 }