<?php
if (!$C->LOGIN_WITH_VK) {
	$this->redirect($C->SITE_URL);	
} else {
	require_once("vk/VK.php");
	require_once("vk/VKException.php");
	$vk = new VK($C->VK_APPID, $C->VK_SECRET);
	$authorize_url = $vk->getAuthorizeURL('photos,wall', $C->SITE_URL.'oauthvkData');
	$this->redirect($authorize_url);	
}
?>