コード例 #1
0
ファイル: NewExploit.php プロジェクト: rawthang/dbx
			$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. ", ";
			}
		}
		/**Formular erzeugen***/
		$path=pathinfo(__FILE__);
		$form=new Formgen("post", $path['filename'].'.'.$path['extension']);
		$form->addTextField("Name", "catname");
		$form->addSelect("kategorie", "category",$category->mysqlSelect());
		$form->addSelect("platform", "platform",$platform->mysqlSelect());
		$form->addSelect("Spache", "language", $languages);
		$form->addTextArea("beschreibung", "content","Beschreibung eingeben", 30,65);
		$form->addTextField("upload from url", "url_upload");
		$form->addUpload("upload from pc", "pc_upload");
		$form->addCheckBox("verified", "verified");
		echo $form->getForm();
		?>

	</div>
</body>
</html>
コード例 #2
0
ファイル: ViewByPlatform.php プロジェクト: rawthang/dbx
		/***************
		 * 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";


			$viewExploit=$f->getLink($e->title(), "ViewExploit.php", array("view"=> $e->id()));
			$viewByAuthor=$f->getLink($e->autor(), "ViewByAuthor.php", array("view"=>1));
コード例 #3
0
ファイル: EditExploit.php プロジェクト: rawthang/dbx
		}else {
		;
		}
		/**Formular erzeugen***/


		$edit=new Getvars();
		$edit->requireVar('edit');
		
		if ($edit->validateVars()){
			$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());
コード例 #4
0
ファイル: pExploit.php プロジェクト: rawthang/dbx
	public function loadPlatform(){
		if ($this->dbh){
			$p=new pPlatform();
			$p->dbh($this->dbh());
			$p->mysqlSelect($this->platform);
			return $p->name();
		}
		
		
	}