403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux 69.187.202.64.host.secureserver.net 3.10.0-1160.144.1.el7.tuxcare.els6.x86_64 #1 SMP Fri May 29 16:22:24 UTC 2026 x86_64
User : transmarket ( 1001)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/transmarket/translator/controllers/bak/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/translator/controllers/bak/save_suggestion2-7-jul-21-bak.php
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include 'connection.php';

require_once('functions.suggestions.php');

$suggestions_obj = new Suggestions();

if (isset($_POST['sid']) && isset($_SESSION['tm_id']) && isset($_POST['suggestion'])) {
	
    $sentence_id_arr = explode( '~', base64_decode($_POST['sid']) ) ;
	$sentence_id = $sentence_id_arr[0];
	$map_id = $sentence_id_arr[1];

    $user_id = $_SESSION['tm_id'];
    $language_id = $_SESSION['tm_language_id'];
	
    if (is_numeric($sentence_id)) {

		//get success suggested records        
		$resultSuggestionSuccessCount =	$suggestions_obj->getSuccessSuggestedBySentenceId( $sentence_id );
			
			//check sentence suggested success less than 3 
            if ($resultSuggestionSuccessCount->num_rows < 3) { 				
				
				//accept the suggestion, update sentence suggestion map make lock and success suggestion 				
				$resultUpdateS = $suggestions_obj->submitSuggestionAndUpdateToSuccess( addslashes($_POST['suggestion']), $map_id );				
				
				if ($resultUpdateS == true) {	
					echo json_encode(array("status" => "200", "msg" => "Suggestion submitted successfully"));
				}else{
					echo json_encode(array("status" => "300", "msg" => "Submission timed out took more than 5 mins"));
				}
				
				//after submit again rerun success count query  				
				$resultSuggestionSuccessCount2 = $suggestions_obj->getSuccessSuggestedBySentenceId( $sentence_id );
				
				//check suggested success count
				if( $resultSuggestionSuccessCount2->num_rows >= 3 ) {	
				
					//lock the sentence in main tbl_sentence table 
					$suggestions_obj->lockSentenceForSuggestions( $sentence_id );
					
				}				
                
				
            } else {
				
				//make suggestion fail in sentence suggestion map
				$suggestions_obj->makeSentenceSuggestionFailed( $sentence_suggestion_map_id );
				
                echo json_encode(array("status" => "300", "msg" => "This sentence has already reached 3 suggestions.<br>
Please skip this and contribute on a new one."));

            }						
        
    } else {
        echo json_encode(array("status" => "300", "msg" => 'Something went wrong, Please try again.'));
    }
	
} else {
    echo json_encode(array("status" => "300", "msg" => 'User not found'));
}

Youez - 2016 - github.com/yon3zu
LinuXploit