Beispiel #1
0
 private static function popupObjectFromArray($arr, $obj = null)
 {
     $jsonData = json_decode($arr['options'], true);
     $type = sgSafeStr($arr['type']);
     if ($obj === null) {
         $className = "SG" . ucfirst(strtolower($type)) . 'Popup';
         require_once dirname(__FILE__) . '/' . $className . '.php';
         $obj = new $className();
     }
     $obj->setType(sgSafeStr($type));
     $obj->setTitle(sgSafeStr($arr['title']));
     if (@$arr['id']) {
         $obj->setId($arr['id']);
     }
     $obj->setWidth(sgSafeStr(@$jsonData['width']));
     $obj->setHeight(sgSafeStr(@$jsonData['height']));
     $obj->setDelay(sgSafeStr(@$jsonData['delay']));
     $obj->setEffectDuration(sgSafeStr(@$jsonData['duration']));
     $obj->setEffect(sgSafeStr($jsonData['effect']));
     $obj->setInitialWidth(sgSafeStr(@$jsonData['initialWidth']));
     $obj->setInitialHeight(sgSafeStr(@$jsonData['initialHeight']));
     $obj->setOptions(sgSafeStr($arr['options']));
     if (@$arr['id']) {
         $obj->setCustomOptions($arr['id']);
     }
     return $obj;
 }
    $twitterLabel = @sgSafeStr($sgSocialOptions['twitterLabel']);
    $pinterestLabel = @sgSafeStr($sgSocialOptions['pinterestLabel']);
    $sgMailSubject = @sgSafeStr($sgSocialOptions['sgMailSubject']);
    $sgMailLable = @sgSafeStr($sgSocialOptions['sgMailLable']);
    $sgSocialButtons = json_decode(@$sgSocialButtons, true);
    $sgTwitterStatus = @sgSafeStr($sgSocialButtons['sgTwitterStatus']);
    $sgFbStatus = @sgSafeStr($sgSocialButtons['sgFbStatus']);
    $sgEmailStatus = @sgSafeStr($sgSocialButtons['sgEmailStatus']);
    $sgLinkedinStatus = @sgSafeStr($sgSocialButtons['sgLinkedinStatus']);
    $sgGoogleStatus = @sgSafeStr($sgSocialButtons['sgGoogleStatus']);
    $sgPinterestStatus = @sgSafeStr($sgSocialButtons['sgPinterestStatus']);
    $sgSocialTheme = @sgSafeStr($sgSocialOptions['sgSocialTheme']);
    $sgSocialButtonsSize = @sgSafeStr($sgSocialOptions['sgSocialButtonsSize']);
    $sgSocialLabel = @sgSafeStr($sgSocialOptions['sgSocialLabel']);
    $sgSocialShareCount = @sgSafeStr($sgSocialOptions['sgSocialShareCount']);
    $sgRoundButton = @sgSafeStr($sgSocialOptions['sgRoundButton']);
}
$colorboxDeafultValues = array('escKey' => true, 'closeButton' => true, 'scrolling' => true, 'opacity' => 0.8, 'reposition' => true, 'width' => false, 'height' => false, 'initialWidth' => '300', 'initialHeight' => '100', 'maxWidth' => false, 'maxHeight' => false, 'overlayClose' => true, 'contentClick' => false, 'fixed' => false, 'top' => false, 'right' => false, 'bottom' => false, 'left' => false, 'duration' => 1, 'delay' => 0);
$popupProDefaultValues = array('closeType' => false, 'onScrolling' => false, 'forMobile' => false, 'repetPopup' => false, 'disablePopup' => false, 'autoClosePopup' => false, 'fbStatus' => true, 'twitterStatus' => true, 'emailStatus' => true, 'linkedinStatus' => true, 'googleStatus' => true, 'pinterestStatus' => true, 'sgSocialLabel' => true, 'roundButtons' => false);
$escKey = sgBoolToChecked($colorboxDeafultValues['escKey']);
$closeButton = sgBoolToChecked($colorboxDeafultValues['closeButton']);
$scrolling = sgBoolToChecked($colorboxDeafultValues['scrolling']);
$reposition = sgBoolToChecked($colorboxDeafultValues['reposition']);
$overlayClose = sgBoolToChecked($colorboxDeafultValues['overlayClose']);
$contentClick = sgBoolToChecked($colorboxDeafultValues['contentClick']);
$closeType = sgBoolToChecked($popupProDefaultValues['closeType']);
$onScrolling = sgBoolToChecked($popupProDefaultValues['onScrolling']);
$forMobile = sgBoolToChecked($popupProDefaultValues['forMobile']);
$repetPopup = sgBoolToChecked($popupProDefaultValues['repetPopup']);
$disablePopup = sgBoolToChecked($popupProDefaultValues['disablePopup']);
$autoClosePopup = sgBoolToChecked($popupProDefaultValues['autoClosePopup']);
    $pinterestLabel = @sgSafeStr($sgSocialOptions['pinterestLabel']);
    $sgMailSubject = @sgSafeStr($sgSocialOptions['sgMailSubject']);
    $sgMailLable = @sgSafeStr($sgSocialOptions['sgMailLable']);
    $sgSocialButtons = json_decode(@$sgSocialButtons, true);
    $sgTwitterStatus = @sgSafeStr($sgSocialButtons['sgTwitterStatus']);
    $sgFbStatus = @sgSafeStr($sgSocialButtons['sgFbStatus']);
    $sgEmailStatus = @sgSafeStr($sgSocialButtons['sgEmailStatus']);
    $sgLinkedinStatus = @sgSafeStr($sgSocialButtons['sgLinkedinStatus']);
    $sgGoogleStatus = @sgSafeStr($sgSocialButtons['sgGoogleStatus']);
    $sgPinterestStatus = @sgSafeStr($sgSocialButtons['sgPinterestStatus']);
    $sgSocialTheme = @sgSafeStr($sgSocialOptions['sgSocialTheme']);
    $sgSocialButtonsSize = @sgSafeStr($sgSocialOptions['sgSocialButtonsSize']);
    $sgSocialLabel = @sgSafeStr($sgSocialOptions['sgSocialLabel']);
    $sgSocialShareCount = @sgSafeStr($sgSocialOptions['sgSocialShareCount']);
    $sgRoundButton = @sgSafeStr($sgSocialOptions['sgRoundButton']);
    $sgPushToBottom = @sgSafeStr($jsonData['pushToBottom']);
    $sgFlikeOptions = json_decode(@$sgFlikeOptions, true);
    $sgFblikeurl = @$sgFlikeOptions['fblike-like-url'];
    $sgFbLikeLayout = @$sgFlikeOptions['fblike-layout'];
}
$sgPopup = array('escKey' => true, 'closeButton' => true, 'scrolling' => true, 'opacity' => 0.8, 'reposition' => true, 'width' => false, 'height' => false, 'initialWidth' => '300', 'initialHeight' => '100', 'maxWidth' => false, 'maxHeight' => false, 'overlayClose' => true, 'contentClick' => false, 'fixed' => false, 'top' => false, 'right' => false, 'bottom' => false, 'left' => false, 'duration' => 1, 'delay' => 0);
$popupProDefaultValues = array('closeType' => false, 'onScrolling' => false, 'forMobile' => false, 'repetPopup' => false, 'disablePopup' => false, 'autoClosePopup' => false, 'fbStatus' => true, 'twitterStatus' => true, 'emailStatus' => true, 'linkedinStatus' => true, 'googleStatus' => true, 'pinterestStatus' => true, 'sgSocialLabel' => true, 'roundButtons' => false, 'sgShareUrl' => 'http//', 'pushToBottom' => true, 'allPages' => false, 'countdownNumbersTextColor' => '', 'countdownNumbersBgColor' => '', 'countDownLang' => 'English', 'countdown-position' => true, 'time-zone' => 'Etc/GMT', 'due-date' => date('Y-m-d', strtotime(' +1 day')));
$escKey = sgBoolToChecked($sgPopup['escKey']);
$closeButton = sgBoolToChecked($sgPopup['closeButton']);
$scrolling = sgBoolToChecked($sgPopup['scrolling']);
$reposition = sgBoolToChecked($sgPopup['reposition']);
$overlayClose = sgBoolToChecked($sgPopup['overlayClose']);
$contentClick = sgBoolToChecked($sgPopup['contentClick']);
$closeType = sgBoolToChecked($popupProDefaultValues['closeType']);
$onScrolling = sgBoolToChecked($popupProDefaultValues['onScrolling']);
$forMobile = sgBoolToChecked($popupProDefaultValues['forMobile']);