403Webshell
Server IP : 64.202.187.69  /  Your IP : 216.73.216.192
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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/transmarket/translator/controllers/save_suggestion2.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.translators.php');

$translators_obj = new Translators();

require_once('functions.suggestions.php');

$suggestions_obj = new Suggestions();

require_once('functions.voting.php');

$voting_obj = new Voting();

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'];	

	//get user current level
	$user_level = $translators_obj->getCurrentUserLevelByUserId( $user_id );

	//after reached level complete, locked submit suggestion, voting till hours time
	$level_completed_locked_in_time_hours =	$suggestions_obj->getSettingsValuesByColumnName( 'level_completed_locked_in_time' );
	
    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, $user_level );	
				
				if ($resultUpdateS == true) {			
				
					//update suggestion started at date in tbl_sentence, after received suggestion if date is null
					$suggestions_obj->updateSentencePendingAtDate( $sentence_id );
				
					//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 );
						
						//start voting at
						$suggestions_obj->updateSentenceVotingStartedAtDate( $sentence_id );
						
					}
					
					//get user total success suggestion count for current level
					$user_success_suggestion_count_for_level = $suggestions_obj->getUserSubmittedSuccessSuggestionCountByUserIdAndLevel( $user_id, $user_level );
					
					//get max no. of suggestion user can submit for current level
					$max_submit_suggestions = $suggestions_obj->getMaxSubmitSuggestionCountByLevel( $user_level );
					
					//get user total success voting count for current level
					$user_success_voting_count_for_level = $voting_obj->getUserSubmittedSuccessVotingCountByUserIdAndLevel( $user_id, $user_level );
					
					//get max no. of voting user can submit for current level
					$max_submit_votings = $voting_obj->getMaxSubmitVotingCountByLevel( $user_level );				
					
					if( $user_success_suggestion_count_for_level >= $max_submit_suggestions && $user_success_voting_count_for_level >= $max_submit_votings ) {
						//Insert entry in to user level logs						
						$suggestions_obj->saveUserLevelLogs( $user_id, $user_level, $user_success_suggestion_count_for_level, $user_success_voting_count_for_level, $level_completed_locked_in_time_hours );
					}			
				
					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"));
				}				
                
				
            } 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