Beispiel #1
0
	/**
	 * 
	 * obacht, die Methode ist nicht sauber
	 * wenn der Parameter id nicht uebergeben wird ein Array mit 
	 * allen Platformobjekten zurückgegeben die in der DB vorhanden sind :)
	 * @param Primary Key $id
	 */
	public function mysqlSelect($id=""){
		if(!$this->dbh())
			return false;
		if (empty($id)){				
			$sql="SELECT * FROM cms_platform";
			$stmt=$this->dbh->prepare($sql);
			$stmt->execute();
			$platforms=array();
					
			foreach($stmt->fetchAll() as $value){
				
				$p = new pPlatform();
				$p->id($value['id']);
				$p->name($value['name']);
				$p->dbh=$this->dbh();
			//	echo $value['id'] . "  " . $value['name']. "\n";
				$platforms[$value['id']]=$p;
				
			}
		//	print_r($platforms);
			return $platforms;
		} else {		
			$sql="SELECT * FROM cms_platform WHERE id=?";			
			$stmt=$this->dbh->prepare($sql);
			$stmt->bindParam(1, $id, PDO::PARAM_INT);
			$stmt->execute();
			$result=$stmt->fetch(PDO::FETCH_ASSOC);
			$this->id($result['id']);
			$this->name($result['name']);
			
			
			
		}
	}//SELECT
Beispiel #2
0
<meta charset="UTF-8">
<title>add exploit</title>
<link rel="stylesheet" media="all" href="layout.css">
</head>
<body>
	<div id="head">
		<h1>add exploit</h1>
		<!-- <img src="img/logo.png" alt="logo" /> -->
	</div>
	<div>
		<h2>new exploit</h2>
		<?php
		$exploit =new pExploit();
		$exploit->dbh($dbh);
		//$exploit->mysqlSelect();
		$platform=new pPlatform();
		$platform->dbh($dbh);
		$category=new pCategory();
		$category->dbh($dbh);


		$vars= new Getvars();
		$vars->requireVar('catname');
		$vars->requireVar('category');
		$vars->requireVar('platform');
		$vars->requireVar('content');
		$vars->assignVar('url_upload');
		$vars->assignVar('pc_upload');
		$vars->assignVar('verified');

Beispiel #3
0
<meta charset="UTF-8">
<title>edit exploit</title>
<link rel="stylesheet" media="all" href="layout.css">
</head>
<body>
	<div id="head">
		<h1>edit exploit</h1>
		<!-- <img src="img/logo.png" alt="logo" /> -->
	</div>
	<div>
		<h2>edit exploit</h2>
		<?php
		$exploit =new pExploit();
		$exploit->dbh($dbh);
		//$exploit->mysqlSelect();
		$platform=new pPlatform();
		$platform->dbh($dbh);
		$category=new pCategory();
		$category->dbh($dbh);


		$vars= new Getvars();
		$vars->requireVar('catname');
		$vars->requireVar('category');
		$vars->requireVar('platform');
		$vars->requireVar('content');
		$vars->assignVar('url_upload');
		$vars->assignVar('pc_upload');
		$vars->assignVar('verified');
		$vars->requireVar('id');
		$vars->requireVar('edit');
Beispiel #4
0
		

		/***************
		 * navigation *
		 **************/
		$nav=new Navigation($f);
		$nav->currentSite($get->site());
		$nav->nElements($n);
		$nav->itemsPerSite(15);
		$nav->targetUrl($sitename);									
		$nav->additionalUrlParams(array('view'=>$get->view()));
		//-----lsExploits--------------------------------------------------------------------------------------------------------------------------------------------------------------
		$e= new pExploit();
		$e->dbh($dbh);
		//$c=new pCategory();
		$p=new pPlatform();
		$p->dbh($dbh);
		$p->mysqlSelect($get->view());
		$exploits=$e->mySqlSelectByPlatform($get->view(),$nav->mysqlStart(), $nav->itemsPerSite());			//anpassen
		
		
		
		$viewByCategory=$f->getLink($p->name(), $sitename, array("view"=> $p->id()));	
		echo "<div class=\"exploit-category\">\n";
		echo "<h4 class=\"category-title\">$viewByCategory</h4><table>\n";
		echo "<tr><th>Date</th><th>DL</th><th>V</th><th>Description</th><th>DL's</th><th>Category</th><th>Author</th></tr>";
		$ctr=0;
		foreach ($exploits as $e){
			$ctr%2==0 ? $modulo="table-gerade" : $modulo="table-ungerade";

Beispiel #5
0
	public function loadPlatform(){
		if ($this->dbh){
			$p=new pPlatform();
			$p->dbh($this->dbh());
			$p->mysqlSelect($this->platform);
			return $p->name();
		}
		
		
	}