8 require_once(CH_DIRECTORY_PATH_INC .
'db.inc.php');
10 define(
'SHARED_SITES_TABLE',
'sys_shared_sites');
14 $iLength = mb_strlen($sURL);
15 for ($i = 0 ; $i < $iLength ; $i++) {
16 $c = mb_substr($sURL, $i, 1);
17 if (ord($c[0]) >= 0 && ord($c[0]) <= 127)
20 $sEncoded .= rawurlencode(mb_substr($sURL, $i, 1));
27 $aSites =
$GLOBALS[
'MySQL']->fromCache (
'sys_shared_sites',
'getAllWithKey',
"SELECT `ID` as `id`, `URL` as `url`, `Icon` as `icon`, `Name` FROM `" .
SHARED_SITES_TABLE .
"`",
'Name');
31 foreach ($aSites
as $sKey => $aValue)
32 $aSites[$sKey][
'url'] .= $sLink;
43 $sIconsUrl = str_replace(
'digg.png',
'', $sIconsUrl);
45 foreach ($aSitesPrepare
as $k => $r) {
47 'icon' => $sIconsUrl . $r[
'icon'],
53 $aVarsContent = array (
54 'ch_repeat:sites' => $aSites,
58 'content' =>
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'popup_share.html', $aVarsContent),
60 return $GLOBALS[
'oFunctions']->transBox(
$GLOBALS[
'oSysTemplate']->parseHtmlByName(
'popup.html', $aVarsPopup),
true);