forked from Wavyzz/dolibarr
add function
This commit is contained in:
@@ -2186,6 +2186,31 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
|
||||
return $rep;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get array of social network dictionary
|
||||
*
|
||||
* @return array Array of Social Networks Dictionary
|
||||
*/
|
||||
function getArrayOfSocialNetworks()
|
||||
{
|
||||
global $conf, $db;
|
||||
$sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks";
|
||||
$socialnetworks = array();
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$socialnetworks[$obj->code] = array(
|
||||
'rowid' => $obj->rowid,
|
||||
'label' => $obj->label,
|
||||
'url' => $obj->url,
|
||||
'icon' => $obj->icon,
|
||||
'active' => $obj->active,
|
||||
);
|
||||
}
|
||||
}
|
||||
return $socialnetworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show social network link
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user