示例#1
0
		$nav->additionalUrlParams(array('view'=>$get->view(), 'order_by' =>$get->order_by(), 'order'=>$get->order()));			
		
		
		
		$exploits=$e->mySqlSelectByCategory($get->view(),$nav->mysqlStart(), $nav->itemsPerSite(),$orderBy,$order);			//anpassen
		/*******order*******************/
		$viewByCategory=$f->getLink($c->name(), $sitename, array("view"=> $c->id()));	
		echo "<div class=\"exploit-category\">\n";
		echo "<h4 class=\"category-title\">$viewByCategory</h4><table class=\"exploit-table\">\n";
		echo "<tr><th>$datelink</th><th>DL</th><th>$verified</th><th>Description</th><th>$hitlink</th><th>$platformlink</th><th>$authorlink</th></tr>";
		$ctr=0;
		foreach ($exploits as $e){
			$ctr%2==0 ? $modulo="table-gerade" : $modulo="table-ungerade";


			$viewExploit=$f->getLink($e->title(), "ViewExploit.php", array("view"=> $e->id()));
			$viewByAuthor=$f->getLink($e->autor(), "ViewByAuthor.php", array("view"=>1));
			$viewByPlatform=$f->getLink($e->loadPlatform(), "ViewByPlatform.php", array("view"=>$e->platform()));

			$download="";
			if ($e->file()!='')
			$download=$f->getLink('&#9112;', $e->file());
			$verified="&#10003;";
			if ($e->verified())
			$verified="&#10006;";
			echo "<tr class=\"$modulo\"><td>{$e->date()}</td><td>$download</td><td>$verified</td><td>$viewExploit</a></td><td>{$e->hits()}</td><td>$viewByPlatform</td><td>$viewByAuthor</td></tr>\n";
			$ctr++;
		}//each
		echo "</table></div>\n";
	
	//-----lsExploits--------------------------------------------------------------------------------------------------------------------------------------------------------------
示例#2
0
	</div>
	<div>
	
	
	<div class="list">
	<table class="exploits-list">
	<?php
	
	
//LOESCHEN
$getDelete=new Getvars();
$getDelete->requireVar('delete');
if ($getDelete->validateVars()){
	$exploit=new pExploit();
	$exploit->dbh($dbh);
	$exploit->id($getDelete->delete());
	$exploit->mysqlDelete();
	
}

	

foreach ($exploits as  $e){
		$view=$fgen->getLink($e->title(), 'ShowExploit.php', array("view" =>$e->id()));
		$edit=$fgen->getLink('edit', 'EditExploit.php', array("edit" =>$e->id()));	
		$delete=$fgen->getLink('delete', 'ListExploit.php',array('delete'=>$e->id()),true, "{$e->title()} löschen?");
	echo "<tr><td>$view</td><td>$edit</td><td>$delete</td></tr>\n";
}

?>
</table>
示例#3
0
			$e=new pExploit();
			$e->dbh($dbh);
			$e->mysqlSelect($edit->edit());					
			
			$categories = array($e->category() =>$e->loadCategory()) + $category->mysqlSelect();
			$platforms=array($e->platform() =>$e->loadPlatform()) + $platform->mysqlSelect();
			$languages=array_merge(array($e->codeLanguage()), $languages);
			$path=pathinfo(__FILE__);
			
		
			$form=new Formgen("post", $path['filename'].'.'.$path['extension']);
			$form->addTextField("Name", "catname", $e->title());
			$form->addSelect("kategorie", "category",$categories);
			$form->addSelect("platform", "platform",$platforms);
			$form->addSelect("Spache", "language", $languages);
			$form->addTextArea("beschreibung", "content",$e->content(), 30,65);
			$form->addTextField("upload from url", "url_upload");
			$form->addUpload("upload from pc", "pc_upload");
			$check=$e->verified()?true:false;
			
			$form->addCheckBox("verified", "verified",$e->verified());
			$form->addHidden("id", $e->id());
			$form->addHidden("edit", $e->id());
			echo $form->getForm();
		}
		?>

	</div>
</body>
</html>
示例#4
0
文件: pExploit.php 项目: rawthang/dbx
	public function mysqlSelect($id=""){
		if(!$this->dbh())
		return false;
		if (empty($id)){
			$sql="SELECT * FROM cms_exploit";
			$stmt=$this->dbh->prepare($sql);
			$stmt->execute();
			$exploits=array();
				
				
			foreach($stmt->fetchAll() as $value){
				$e=new pExploit();
				$e->id($value['id']);
				$e->date=$value['date'];
				$e->verified=$value['verified'];
				$e->hits=$value['hits'];
				$e->autor=$value['autor'];
				$e->codeLanguage=$value['code_language'];
				$e->title=$value['title'];
				$e->content=$value['content'];
				$e->file=$value['file'];
				$e->category=$value['category'];
				$e->platform=$value['platform'];
				$e->dbh=$e->dbh();
				$exploits[]=$e;
			}
			return $exploits;
		} else {
			$sql="SELECT * FROM cms_exploit WHERE id=?";
			$stmt=$this->dbh->prepare($sql);
			$stmt->bindParam(1, $id, PDO::PARAM_INT);
			$stmt->execute();
			
			$value=$stmt->fetch(PDO::FETCH_ASSOC);			
			if($value==null)
				return false;
			$this->id($value['id']);
			$this->date=$value['date'];
			$this->verified=$value['verified'];
			$this->hits=$value['hits'];
			$this->autor=$value['autor'];
			$this->codeLanguage=$value['code_language'];
			$this->title=$value['title'];
			$this->content=$value['content'];
			$this->file=$value['file'];
			$this->category=$value['category'];
			$this->platform=$value['platform'];
		}
	}//function