예제 #1
0
파일: pCategory.php 프로젝트: rawthang/dbx
	public function mysqlSelect($id=""){
		if(!$this->dbh())
		return false;
		if (empty($id)){		
			$sql="SELECT * FROM cms_cat";
			$stmt=$this->dbh->prepare($sql);
			$stmt->execute();
			$categories=array();
				
			foreach($stmt->fetchAll() as $value){

				$p = new pCategory();
				$p->id($value['id']);
				$p->name($value['cat']);
				$p->dbh=$this->dbh();
				$categories[$p->id]=$p;

			}
			return $categories;
		} else {
			$sql="SELECT * FROM cms_cat 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['cat']);
				
				
		}
	}
예제 #2
0
파일: NewExploit.php 프로젝트: rawthang/dbx
<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');


		/*benutzereingaben auswerten*/
		if($vars->validateVars()){
예제 #3
0
	/**sortieren ***/
	$get->assignVar('order');
	$get->assignVar('order_by');
	/**sortieren ***/
	
	if($get->validateVars()){
		$e= new pExploit();
		$e->dbh($dbh);
		$n=$e->mysqlCountByCategory($get->view());															//anpassen
		


		//-----lsExploits--------------------------------------------------------------------------------------------------------------------------------------------------------------
		$e= new pExploit();
		$e->dbh($dbh);
		$c=new pCategory();
		$c->dbh($dbh);
		$c->mysqlSelect($get->view());
		/*******order*******************/
		$currentVars=array("view"=>$get->view());
		$order="asc";		//asc||desc
		$orderBy="date";	//order by column field
		
		if ($get->order_by()!="" && $get->order()!=""){
			$orderBy=$get->order_by();
			$order=$get->order();
		}
		
		
		$get->order()=="asc"?$cursor="&#8593;" :  $cursor="&#8595;";
		$get->order()=="asc"?$order="desc" :  $order="asc";
예제 #4
0
<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');

		/*benutzereingaben auswerten*/
예제 #5
0
파일: pExploit.php 프로젝트: rawthang/dbx
	public function loadCategory(){
		if ($this->dbh){
				$c=new pCategory();
				$c->dbh($this->dbh());
				$c->mysqlSelect($this->category());
				return $c->name();
			
		}						
	}
예제 #6
0
파일: index.php 프로젝트: rawthang/dbx
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ue-cr3w exploits</title>
<link rel="stylesheet" media="all" href="layout.css">
</head>
<body>
	<div id="head">
		<h1><a href="index.php">ue-cr3w exploits</a></h1>
		<img src="img/logo.png" alt="logo" />
	</div>
	<div>
		<!-- aus jeder kategorie 7-8 ausgeben. div drum, werte in table -->
	<?php
	$c=new pCategory();
	$c->dbh($dbh);
	$categories=$c->mysqlSelect();


	foreach ($categories as $c){


		//-----lsExploits--------------------------------------------------------------------------------------------------------------------------------------------------------------
		$f=new Formgen();
		$e= new pExploit();
		$e->dbh($dbh);
		$exploits=$e->mySqlSelectByCategory($c->id(),0, 8);
		$viewByCategory=$f->getLink($c->name(), "ViewByCategory.php", array("view"=> $c->id()));
		
		echo "<div class=\"exploit-category\">\n";