/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Link represents an HTML link (an HTML a tag).
*/
class Link
/**
* @var string The URI of the page where the link is embedded (or the base href)
* @param \DOMNode $node A \DOMNode instance
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
* @param string $method The method to use for the link (get by default)
*
* @throws \InvalidArgumentException if the node is not a link
/**
* Gets the method associated with this link.
/**
* Gets the URI associated with this link.
/**
* Link represents an HTML link (an HTML a or area tag).
*/
class Link
/**
* @var string The URI of the page where the link is embedded (or the base href)
* @param \DOMElement $node A \DOMElement instance
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
* @param string $method The method to use for the link (get by default)
*
* @throws \InvalidArgumentException if the node is not a link
/**
* Gets the method associated with this link.
/**
* Gets the URI associated with this link.
class Link {
// sql fields to build an object from mysql
//const SQL = " link_id as id, link_author as author, link_blog as blog, link_status as status, link_votes as votes, link_negatives as negatives, link_anonymous as anonymous, link_votes_avg as votes_avg, link_aleatorios_positivos as aleatorios_positivos, link_aleatorios_negativos as aleatorios_negativos, link_comments as comments, link_karma as karma, link_randkey as randkey, link_category as category, link_url as url, link_uri as uri, link_url_title as title, link_title as title, link_tags as tags, link_content as content, UNIX_TIMESTAMP(link_date) as date, UNIX_TIMESTAMP(link_sent_date) as sent_date, link_sent as sent, UNIX_TIMESTAMP(link_modified) as modified, link_content_type as content_type, link_ip as ip, link_thumb_status as thumb_status, link_thumb_x as thumb_x, link_thumb_y as thumb_y, link_thumb as thumb, link_comentarios_permitidos as comentarios_permitidos, link_votos_permitidos as votos_permitidos, user_login as username, user_email as email, user_avatar as avatar, user_karma as user_karma, user_level as user_level, user_adcode, cat.category_name as category_name, cat.category_uri as category_uri, meta.category_id as meta_id, meta.category_name as meta_name, favorite_link_id as favorite, clicks.counter as clicks, visits.counter as visits FROM links LEFT JOIN favorites ON (@user_id > 0 and favorite_user_id = @user_id and favorite_type = 'link' and favorite_link_id = links.link_id) LEFT JOIN categories as cat on (cat.category_id = links.link_category) LEFT JOIN categories as meta on (meta.category_id = cat.category_parent) LEFT JOIN link_clicks as clicks on (clicks.id = links.link_id) LEFT JOIN link_visits as visits on (visits.id = links.link_id), users ";
// sql fields to build an object from mysql
const SQL = " link_id as id, link_author as author, link_blog as blog, link_status as status, link_votes as votes, link_negatives as negatives, link_anonymous as anonymous, link_votes_avg as votes_avg, link_aleatorios_positivos as aleatorios_positivos, link_aleatorios_negativos as aleatorios_negativos, link_comments as comments, link_karma as karma, link_randkey as randkey, link_category as category, link_url as url, link_uri as uri, link_url_title as title, link_title as title, link_tags as tags, link_content as content, UNIX_TIMESTAMP(link_date) as date, UNIX_TIMESTAMP(link_sent_date) as sent_date, link_sent as sent, UNIX_TIMESTAMP(link_modified) as modified, link_content_type as content_type, link_ip as ip, link_thumb_status as thumb_status, link_thumb_x as thumb_x, link_thumb_y as thumb_y, link_thumb as thumb, link_comentarios_permitidos as comentarios_permitidos, link_votos_permitidos as votos_permitidos, user_login as username, user_email as email, user_avatar as avatar, user_karma as user_karma, user_level , cat.category_name as category_name, cat.category_uri as category_uri, meta.category_id as meta_id, meta.category_name as meta_name, favorite_link_id as favorite, clicks.counter as clicks, visits.counter as visits, votes.vote_value as voted FROM links
INNER JOIN users on (user_id = link_author)
LEFT JOIN (categories as cat, categories as meta) on (cat.category_id = links.link_category AND meta.category_id = cat.category_parent)
LEFT JOIN votes ON (link_date > @enabled_votes and vote_type='links' and vote_link_id = links.link_id and vote_user_id = @user_id and ( @user_id > 0 OR vote_ip_int = @ip_int ) )
LEFT JOIN favorites ON (@user_id > 0 and favorite_user_id = @user_id and favorite_type = 'link' and favorite_link_id = links.link_id)
LEFT JOIN link_clicks as clicks on (clicks.id = links.link_id)
LEFT JOIN link_visits as visits on (visits.id = links.link_id) ";
if (is_numeric($id) && $id > 0) $selector = " link_id = $id ";
else $selector = " link_uri = '$id' ";
/**
* Link represents an HTML link (an HTML a tag).
*/
class Link
/**
* @var string The URI of the page where the link is embedded (or the base href)
* @param \DOMNode $node A \DOMNode instance
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
* @param string $method The method to use for the link (get by default)
*
* @throws \InvalidArgumentException if the node is not a link
/**
* Gets the method associated with this link.
/**
* Gets the URI associated with this link.
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
include_once('vtlib/Vtiger/Utils/StringTemplate.php');
include_once 'vtlib/Vtiger/LinkData.php';
/**
* Provides API to handle custom links
*/
class Vtiger_Link {
var $tabid;
var $linkid;
var $linktype;
var $linklabel;
var $linkurl;
var $linkicon;
var $sequence;
$this->tabid = $valuemap['tabid'];
$this->linkid = $valuemap['linkid'];
$this->linktype=$valuemap['linktype'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_link_manager_disabled_message();
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];
/**
* Link represents an HTML link (an HTML a tag).
*/
class Link
/**
* @var string The URI of the page where the link is embedded (or the base href)
* @param \DOMNode $node A \DOMNode instance
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
* @param string $method The method to use for the link (get by default)
*
* @throws \InvalidArgumentException if the node is not a link
/**
* Gets the method associated with this link.
/**
* Gets the URI associated with this link.
/**
* Manage link administration actions.
*
* This page is accessed by the link management pages and handles the forms and
* AJAX processes for link actions.
*
wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]'));
if ( ! current_user_can('manage_links') )
wp_die( __('You do not have sufficient permissions to edit the links for this site.') );
$action = 'move';
if ( !empty($_POST['linkcheck']) )
$linkcheck = $_POST['linkcheck'];