コード例 #1
0
ファイル: NewExploit.php プロジェクト: rawthang/dbx

		/*benutzereingaben auswerten*/
		if($vars->validateVars()){

			$e= new pExploit();
			$e->autor('anonymous');
			$e->title($vars->catname());
			$e->category($vars->category());
			$e->platform($vars->platform());
			$e->content($vars->content());
			$e->codeLanguage($vars->language());
			$verified=false;
			if ($vars->verified()=='on')
			$verified=true;
			$e->verified($verified);
			$e->dbh($dbh);

			$upload=new Upload($vars->url_upload(),$_FILES['pc_upload']);
			$upload->uploaddir('upload');
			$e->file($upload->upload());

			$e->mysqlInsert();
			echo "<h4>{$vars->catname()} hinzugef&uuml;gt</h4>";
		}else {
			//nicht alle erforderlichen Variablen dabei
			echo "<h5>missing stuff:</h5>";
			foreach ($vars->missingVars()as $missing){
				echo $missing. ", ";
			}
		}
コード例 #2
0
ファイル: EditExploit.php プロジェクト: rawthang/dbx
			$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>
コード例 #3
0
ファイル: ViewByCategory.php プロジェクト: rawthang/dbx
		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--------------------------------------------------------------------------------------------------------------------------------------------------------------
	?>

		<div class="list-navigation">
		<?php echo $nav;
		
		
		
	}
コード例 #4
0
ファイル: ViewExploit.php プロジェクト: rawthang/dbx
	if ($varExploit->validateVars()){
		//load 
		$e=new pExploit();
		$e->dbh($dbh);
		$e->mysqlSelect($varExploit->view());			
		$f=new Formgen();

		
		//output		
		$link= $f->getLink("download", $e->file());
		
		
		
		echo $f->getHeading($e->title(), 4);		
		echo "<div class=\"exploit-autor\">author:{$e->autor()}</div>";
		echo "<div class=\"exploit-date\">date:{$e->date()}</div>";
		echo "<div class=\"exploit-hits\">hits:{$e->hits()}</div>";
		echo "<div class=\"exploit-verified\">verified:{$e->verified()}</div>";
		echo '<div class="exploit-category">'.$e->loadCategory().'</div>';
		echo '<div class="exploit-platform">'.$e->loadPlatform().'</div>';
		echo "<div class=\"exploit-download\">$link</div>";
		echo '<div class="exploit-content">'.$e->getFormatedCode().'</div>';
		
		$e->mysqlUpdate();
	}//if show exploit		
	?>

	</div>
</body>
</html>