//including classes include 'classes/coders_basic.php'; include 'classes/coders_rating.php'; include 'classes/contests.php'; include 'classes/hackerearth_api_connect.php'; include 'classes/hackerearth_data.php'; include 'classes/hackerearth_candidate_api_connect.php'; include 'classes/admin.php'; include 'classes/api_table.php'; //including functions include 'functions/new_rating.php'; include 'functions/probability_function.php'; //declaring contest variables $contest = new contest(); $contest_id = $contest->get_not_evaluated_contest(); $cid = $contest->get_contest_no($contest_id); $contest_type = $contest->get_contest_type($contest_id); //calling the function if ($contest_type == 1) { update_details($contest, $contest_id, $contest_type, $cid); } else { update_details_global($contest, $contest_id, $contest_type, $cid); } function update_details($contest, $contest_id, $contest_type, $cid) { //adding contest details //creating object of api echo "inside update details "; $provider = "hackerearth"; $api_table = new api_table(); $api = new api($api_table->get_api_url($provider), $api_table->get_client_id($provider), $api_table->get_client_secret($provider));