asgalEffectgallery($content); return $returnGallery; } function appsliderPage() { add_menu_page('Apptha Slider Gallery', 'Apptha Slider Gallery', '4', 'slideAlbum', 'show_appslideMenu',get_bloginfo('url').'/wp-content/plugins/'.dirname(plugin_basename(__FILE__)).'/images/icon.png'); //add_submenu_page("asgallAlbum", "Mac Gallery", "Galleries",4, "macGallery","show_asgallMenu"); add_submenu_page('slideAlbum', 'Albums', 'Albums', 4, 'slideAlbum', 'show_appslideMenu'); add_submenu_page('slideAlbum', 'Image upload', 'Upload Photos', 'manage_options', 'slidePhotos', 'show_appslideMenu'); //add_submenu_page('asgallAlbum', 'Tags', 'Tags', 'manage_options', 'asgalltags', 'show_asgallMenu'); add_submenu_page('slideAlbum', 'Settings', 'Settings', 'manage_options', 'slideSettings', 'show_appslideMenu'); } function show_appslideMenu() { ?>
";print_r($settingValues);echo "";
$colNames = array('asgall-slide-photo-width','asgall-slide-photo-height','asgall-alb-photo-width','asgall-alb-photo-Height','asgall-photo-tumb-w','asgall-photo-tumb-h','asgall-photo-gene-w','asgall-photo-gene-h');
$numOfTimes = count($colNames);
$findValues = array();
$updateintable = array(); // use to update in table
for($i = 0 ; $i < $numOfTimes ; $i++ )
{
// echo $i.'***** '.$settingValues[0][$colNames[$i]] .'=='. $_REQUEST[$colNames[$i]]."
";
$isstore = $settingValues[0][$colNames[$i]] - $_REQUEST[$colNames[$i]]."
"; ;
$isstore = intval($isstore);
if($isstore){
$updateintable[$colNames[$i]] = $_REQUEST[$colNames[$i]] ;
$findValues[] = $i;
}
}
$tableName = $wpdb->prefix."asgall_settings_menu";
$wpdb->update( $tableName , $updateintable , array( 'sno' => 1) );
// echo ""; print_r($_REQUEST); echo "
";
// echo ""; print_r($updateintable); echo "
";
// echo ""; print_r($findValues); echo "
";
$c = count($findValues);
if($c)
{ sort($findValues);
$changeColNames = array();
for($j = 0 ; $j < $c ; $j++ )
{
$changeColNames[] = $colNames[$findValues[$j]];
//$updateintable[$colNames[$findValues[$j]]] = $_REQUEST[$colNames[$j]] ;
}
$allPhotsData = array();
for ($i = 0 ; $i< $c ; $i++)
{
$value = intval($findValues[$i]);
if($value % 2 == 0){ // if changed value start with even then
if(in_array($value+1 , $findValues)){ // if he change same photo W & H
$colW = $_REQUEST[$colNames[$value]]; //taking W value
$colH = $_REQUEST[$colNames[$value+1]]; // Taking HEIGHT VALU
$allPhotsData[$i] = array('name' => $changeColNames[$i], 'width' => $colW , 'height' => $colH);
$i++; //deleting height value
}
else{ // if he chane only Height
$colW = $_REQUEST[$colNames[$value]];
$colH = $settingValues[0][$colNames[$value+1]];
$allPhotsData[$i] = array('name' => $changeColNames[$i], 'width' => $colW , 'height' => $colH);
}
}
else{ // if changed value is odd then
if(in_array( ($value-1) , $findValues)){
$colW = $_REQUEST[$colNames[$value-1]];
$colH = $_REQUEST[$colNames[$value]];
$allPhotsData[$i] = array('name' => $changeColNames[$i], 'width' => $colW , 'height' => $colH);
}
else{ $colW = $settingValues[0][$colNames[$value-1]];
$colH = $_REQUEST[$colNames[$value]];
$allPhotsData[$i] = array('name' => $changeColNames[$i], 'width' => $colW , 'height' => $colH);
}
}
}//for end
}//if end
//echo ""; print_r($allPhotsData); echo "";
echo " ";
echo " ";
if(is_array($allPhotsData))
{
foreach($allPhotsData as $key => $values){
echo "";
}
}
}// IF END FOR RESIZE THUMBNILS
$viewSetting = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "asgall_settings_menu" , ARRAY_A);
if($get_title['title'] != $get_key)
{
?>
query("INSERT INTO " . $wpdb->prefix . "asgallalbum (`asgallAlbum_id`, `asgallAlbum_name`, `asgallAlbum_description`, `asgallAlbum_image`, `asgallAlbum_status`, `asgallAlbum_date`,`asgallGallery_id`,`is_delete`) VALUES
(1, 'First Album', 'This is my first album ', '', 'ON', NOW(), 1, 0)");
$insertGalleryDefault = $wpdb->query("INSERT INTO " . $wpdb->prefix . "asgallgallery (`asgallGallery_id`, `asgallGallery_name`, `asgallGallery_status`) VALUES
(1, 'Default Gallery', 'ON')");
}
$lookupObj = array();
$chars_str;
$chars_array = array();
function asgall_macgal_generate($domain)
{
$code=asgall_macgal_encrypt($domain);
$code = substr($code,0,25)."CONTUS";
return $code;
}
// Include the respective page based of the page request in url
function encrypt() {
$iv = iv();
$encryptKey = get_option('EncriptionKey');
$data = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, 'appthaslider', 'Powered By Apptha', MCRYPT_MODE_ECB, $iv);
return base64_encode($data);
}
function iv() {
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
return $iv;
}
function apiKey_asgall() {
$const = "+fKIAPT7CCcFHvkVYoXS5J8SQ3KKhLIybStOQZIumfexdp5FUHcL2x+wtCgrR9S7yPgE6B2r0x3wnvNXrBRqtj588gTqu17cYHkDyuSPZPM=";
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$const = base64_decode($const);
if (conf__PHSHOP_MACDOC_EXTENSION != 1)
$val = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, "appthaslider", $const, MCRYPT_MODE_ECB, $iv);
return $val;
}
function asgall_macgal_encrypt($tkey) {
$message = "EW-ASGMP0EFIL9XEV8YZAL7KCIUQ6NI5OREH4TSEB3TSRIF2SI1ROTAIDALG-JW";
for($i=0;$i