function lookup_points($site_id)
{
    $site = get_votesite_by_id($site_id);
    $web_content = file_get_contents($site->site_vote_url);
    $match = array();
    preg_match($site->advanced_lookup_text, $web_content, $match);
    $points = $match[1];
    return convert_to_int($points);
}
function generate_edit_form()
{
    $vote_site = get_votesite_by_id($_POST['site_id']);
    echo "<form action='" . get_admin_url() . "admin.php?page=edit_vote_site' id='option_form' method='POST'>";
    echo "<input type='hidden' name='save_edit' value='1'>";
    echo "<input type='hidden' name='site_id' value='" . $_POST['site_id'] . "'>";
    echo "Svetaines pavadinimas: <br>";
    echo "<input type='text' name='site_name' value='" . $vote_site->site_name . "'><br><br>";
    echo "Svetaines bannerio url: <br>";
    echo "<input type='text' name='site_banner_url' value='" . $vote_site->site_banner_url . "'><br><br>";
    echo "Svetaines balsavimo url: <br>";
    echo "<input type='text' name='site_vote_url' value='" . $vote_site->site_vote_url . "'><br><br>";
    echo "Svetaines balsavimo daznis (minutemis): <br>";
    echo "<input type='number' name='vote_interval' value='" . $vote_site->interval / 60 . "'><br><br>";
    echo "Svetaines balsavimo daznio textas (vietoj 60m ->1h): <br>";
    echo "<input type='text' name='vote_interval_text' value='" . $vote_site->interval_text . "'><br><br>";
    echo "Svetaines tekstas kurio turi buti ieskoma ( pasitikrinti pagal kitus ): <br>";
    echo '<input type="text" name="look_up_text" value="' . $vote_site->advanced_lookup_text . '"><br><br>';
    echo "<input type='submit' value='REDAGUOTI'></form>";
}
<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(-1);
include 'Functions.php';
$user_id = $_GET['userid'];
$site_id = $_GET['siteid'];
$site = get_votesite_by_id($site_id);
$settings = get_option('votesys_options');
$vote_user = get_user_stats($user_id);
echo lookup_points($site_id);
/*
if($settings['advance_tracking'])
{
    if(can_vote($vote_user,$site_id) && !lookup_pending($site_id,$vote_user))
    {
	$lookup_time = time();
	
	add_lookup($site_id,$lookup_time,$vote_user);
	header('Location: '.$site->site_vote_url);
	
	flush();
	sleep(45);
	
	$lookup = get_lookup_data($lookup_time);
	$points = lookup_points($site_id);
		
	if($points > $lookup-> points_on_lookup)
	{
            vote($vote_user,$site_id);