コード例 #1
0
function cu3er__writeToFile($id, $ret = false)
{
    if (is_numeric($id)) {
        global $wpdb;
        $uploadsDir = wp_upload_dir();
        // embeded code for showing cu3er //
        $row = $wpdb->get_row("SELECT * FROM `" . $wpdb->prefix . "cu3er__settings` LIMIT 1", ARRAY_A) or die(mysql_error());
        $setting = array();
        foreach ($row as $key => $value) {
            $row[$key] = stripslashes($value);
            $settings[$key] = str_replace("'", "\\'", $row[$key]);
        }
        $row = $wpdb->get_row("SELECT * FROM `" . $wpdb->prefix . "cu3er__slideshows` WHERE `id`='" . $id . "'", ARRAY_A) or die(mysql_error());
        $slideshowS = array();
        foreach ($row as $key => $value) {
            $row[$key] = stripslashes($value);
            $slideshowS[$key] = str_replace("'", "\\'", $row[$key]);
        }
        //$slideshowS = str_replace("'", "\'", $row);
        $row = $wpdb->get_row("SELECT * FROM `" . $wpdb->prefix . "cu3er__defaults` WHERE `slideshow_id`='" . $id . "'", ARRAY_A) or die(mysql_error());
        $default = array();
        foreach ($row as $key => $value) {
            $row[$key] = stripslashes($value);
            $default[$key] = str_replace("'", "\\'", $row[$key]);
        }
        $rows = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "cu3er__slides` WHERE `slideshow_id`='" . $id . "' ORDER BY `position` ASC", ARRAY_A) or die(mysql_error());
        foreach ($rows as $row) {
            $arr = array();
            foreach ($row as $key => $value) {
                $row[$key] = stripslashes($value);
                $arr[$key] = str_replace("'", "\\'", $row[$key]);
            }
            $slides[] = $arr;
        }
        if ($default['posts_fit'] != '' && $default['posts_fit'] != 'default') {
            $default['fit'] = $default['posts_fit'];
        }
        if ($settings['licence'] != '') {
            $arrXml[0]['licence'] = "<![CDATA[" . urldecode(trim($settings['licence'])) . "]]>";
        }
        if ($settings['licence1'] != '') {
            $arrXml[1]['licence'] = "<![CDATA[" . urldecode(trim($settings['licence1'])) . "]]>";
        }
        if ($settings['licence2'] != '') {
            $arrXml[2]['licence'] = "<![CDATA[" . urldecode(trim($settings['licence2'])) . "]]>";
        }
        if ($settings['licence3'] != '') {
            $arrXml[3]['licence'] = "<![CDATA[" . urldecode(trim($settings['licence3'])) . "]]>";
        }
        if ($settings['licence4'] != '') {
            $arrXml[4]['licence'] = "<![CDATA[" . urldecode(trim($settings['licence4'])) . "]]>";
        }
        $slideshowS['width_type'] = $slideshowS['width_type'] == '%' ? '%' : '';
        $slideshowS['height_type'] = $slideshowS['height_type'] == '%' ? '%' : '';
        $arrXml['project_settings']['width'] = $slideshowS['width'] . $slideshowS['width_type'];
        $arrXml['project_settings']['height'] = $slideshowS['height'] . $slideshowS['height_type'];
        $arrXml['settings']['background']['color']['vle'] = str_replace('#', '0x', $slideshowS['background']);
        $arrXml['settings']['background']['color']['@attributes']['transparent'] = $slideshowS['backgroundType'] == 'transparent' ? 'true' : 'false';
        $arrXml['settings']['background']['image']['url'] = "<![CDATA[" . $slideshowS['bg_image'] . "]]>";
        if ($arrXml['settings']['background']['image']['url'] == '<![CDATA[]]>') {
            $arrXml['settings']['background']['image']['url'] = '';
        }
        $arrXml['settings']['background']['image']['@attributes']['use_image'] = $slideshowS['bg_use_image'];
        $arrXml['settings']['background']['image']['@attributes']['align_to'] = $slideshowS['bg_align_to'];
        $arrXml['settings']['background']['image']['@attributes']['align_pos'] = $slideshowS['bg_align_pos'];
        $arrXml['settings']['background']['image']['@attributes']['x'] = $slideshowS['bg_x'];
        $arrXml['settings']['background']['image']['@attributes']['y'] = $slideshowS['bg_y'];
        $arrXml['settings']['background']['image']['@attributes']['scaleX'] = $slideshowS['bg_scaleX'];
        $arrXml['settings']['background']['image']['@attributes']['scaleY'] = $slideshowS['bg_scaleY'];
        if ($slideshowS['sdw_use_image'] == 'true' && $slideshowS['sdw_image'] != '') {
            $arrXml['settings']['shadow']['@attributes']['use_image'] = $slideshowS['sdw_use_image'];
            $arrXml['settings']['shadow']['@attributes']['show'] = $slideshowS['sdw_show'];
            $arrXml['settings']['shadow']['@attributes']['color'] = str_replace('#', '0x', $slideshowS['sdw_color']);
            $arrXml['settings']['shadow']['@attributes']['alpha'] = $slideshowS['sdw_alpha'];
            $arrXml['settings']['shadow']['@attributes']['blur'] = $slideshowS['sdw_blur'];
            $arrXml['settings']['shadow']['@attributes']['corner_TL'] = $slideshowS['sdw_corner_tl'];
            $arrXml['settings']['shadow']['@attributes']['corner_TR'] = $slideshowS['sdw_corner_tr'];
            $arrXml['settings']['shadow']['@attributes']['corner_BL'] = $slideshowS['sdw_corner_bl'];
            $arrXml['settings']['shadow']['@attributes']['corner_BR'] = $slideshowS['sdw_corner_br'];
            $arrXml['settings']['shadow']['url'] = $slideshowS['sdw_image'];
        }
        if ($settings['branding'] == 'yes') {
            if ($slideshowS['br_align_to'] != '') {
                $arrXml['settings']['branding']['@attributes']['align_to'] = $slideshowS['br_align_to'];
            }
            if ($slideshowS['br_align_pos'] != '') {
                $arrXml['settings']['branding']['@attributes']['align_pos'] = $slideshowS['br_align_pos'];
            }
            if ($slideshowS['br_x'] != '') {
                $arrXml['settings']['branding']['@attributes']['x'] = $slideshowS['br_x'];
            }
            if ($slideshowS['br_y'] != '') {
                $arrXml['settings']['branding']['@attributes']['y'] = $slideshowS['br_y'];
            }
            $arrXml['settings']['branding']['remove_logo_loader'] = 'true';
            $arrXml['settings']['branding']['remove_right_menu_info'] = 'true';
            $arrXml['settings']['branding']['remove_right_menu_licence'] = 'true';
        }
        if ($slideshowS['images_folder'] != '') {
            $fImages = trailingslashit($slideshowS['images_folder']);
            if (cu3er__isOnSameDomain($fImages)) {
                $fImages = cu3er__removeDomainName($fImages);
            }
        } else {
            $fImages = '';
        }
        $arrXml['settings']['folder_images'] = "<![CDATA[" . $fImages . "]]>";
        if ($arrXml['settings']['folder_images'] == '<![CDATA[]]>') {
            $arrXml['settings']['folder_images'] = '';
        }
        if ($slideshowS['fonts_folder'] != '') {
            $fFonts = trailingslashit($slideshowS['fonts_folder']);
            if (cu3er__isOnSameDomain($fFonts)) {
                $fFonts = cu3er__removeDomainName($fFonts);
            }
        } else {
            $fFonts = '';
        }
        $arrXml['settings']['folder_fonts'] = "<![CDATA[" . $fFonts . "]]>";
        if ($arrXml['settings']['folder_fonts'] == '<![CDATA[]]>') {
            $arrXml['settings']['folder_fonts'] = '';
        }
        if ($slideshowS['pr_image'] != '') {
            $arrXml['preloader']['image']['@attributes']['align_to'] = $slideshowS['pr_align_to'];
            $arrXml['preloader']['image']['@attributes']['align_pos'] = $slideshowS['pr_align_pos'];
            $arrXml['preloader']['image']['@attributes']['x'] = $slideshowS['pr_x'];
            $arrXml['preloader']['image']['@attributes']['y'] = $slideshowS['pr_y'];
            $arrXml['preloader']['image']['@attributes']['scaleX'] = $slideshowS['pr_scaleX'];
            $arrXml['preloader']['image']['@attributes']['scaleY'] = $slideshowS['pr_scaleY'];
            $arrXml['preloader']['image']['@attributes']['loader_direction'] = $slideshowS['pr_loader_direction'];
            $arrXml['preloader']['image']['@attributes']['alpha_loader'] = $slideshowS['pr_alpha_loader'];
            $arrXml['preloader']['image']['@attributes']['alpha_bg'] = $slideshowS['pr_alpha_bg'];
            $arrXml['preloader']['image']['@attributes']['tint_loader'] = $slideshowS['pr_tint_loader'];
            $arrXml['preloader']['image']['@attributes']['tint_bg'] = $slideshowS['pr_tint_bg'];
            $arrXml['preloader']['image']['@attributes']['width'] = $slideshowS['pr_width'];
            $arrXml['preloader']['image']['@attributes']['height'] = $slideshowS['pr_height'];
            $arrXml['preloader']['image']['url'] = $slideshowS['pr_image'];
        }
        $arrXml['defaults']['slide']['@attributes']['time'] = $default['duration'];
        $arrXml['defaults']['slide']['@attributes']['color'] = str_replace('#', '0x', $default['color']);
        $arrXml['defaults']['slide']['@attributes']['transparent'] = $default['transparent'];
        $arrXml['defaults']['slide']['link']['vle'] = "<![CDATA[" . $default['link'] . "]]>";
        if ($arrXml['defaults']['slide']['link']['vle'] == '<![CDATA[]]>') {
            $arrXml['defaults']['slide']['link']['vle'] = '';
        }
        $arrXml['defaults']['slide']['link']['@attributes']['target'] = $default['target'];
        $arrXml['defaults']['slide']['description']['link']['vle'] = "<![CDATA[" . $default['dlink'] . "]]>";
        if ($arrXml['defaults']['slide']['description']['link']['vle'] == '<![CDATA[]]>') {
            $arrXml['defaults']['slide']['description']['link']['vle'] = '';
        }
        $arrXml['defaults']['slide']['description']['link']['@attributes']['target'] = $default['dtarget'];
        $arrXml['defaults']['slide']['image']['@attributes']['align_pos'] = $default['align_pos'];
        $arrXml['defaults']['slide']['image']['@attributes']['x'] = $default['x'];
        $arrXml['defaults']['slide']['image']['@attributes']['y'] = $default['y'];
        $arrXml['defaults']['slide']['image']['@attributes']['scaleX'] = $default['scaleX'];
        $arrXml['defaults']['slide']['image']['@attributes']['scaleY'] = $default['scaleY'];
        $arrXml['defaults']['slide']['image']['@attributes']['fit'] = $default['fit'];
        $arrXml['defaults']['transition']['@attributes']['type'] = $default['type'];
        $arrXml['defaults']['transition']['@attributes']['columns'] = $default['columns'];
        $arrXml['defaults']['transition']['@attributes']['rows'] = $default['rows'];
        $arrXml['defaults']['transition']['@attributes']['type2D'] = $default['type2d'];
        $arrXml['defaults']['transition']['@attributes']['flipAngle'] = $default['flipAngle'];
        $arrXml['defaults']['transition']['@attributes']['flipOrder'] = $default['flipOrder'];
        $arrXml['defaults']['transition']['@attributes']['flipShader'] = $default['flipShader'];
        $arrXml['defaults']['transition']['@attributes']['flipOrderFromCenter'] = $default['flipOrderFromCenter'];
        $arrXml['defaults']['transition']['@attributes']['flipDirection'] = $default['flipDirection'];
        $arrXml['defaults']['transition']['@attributes']['flipColor'] = str_replace('#', '0x', $default['flipColor']);
        $arrXml['defaults']['transition']['@attributes']['flipBoxDepth'] = $default['flipBoxDepth'];
        $arrXml['defaults']['transition']['@attributes']['flipDepth'] = $default['flipDepth'];
        $arrXml['defaults']['transition']['@attributes']['flipEasing'] = $default['flipEasing'];
        $arrXml['defaults']['transition']['@attributes']['flipDuration'] = $default['flipDuration'];
        $arrXml['defaults']['transition']['@attributes']['flipDelay'] = $default['flipDelay'];
        $arrXml['defaults']['transition']['@attributes']['flipDelayRandomize'] = $default['flipDelayRandomize'];
        $arrXml['slides']['@attributes']['align_pos'] = $default['salign_pos'];
        $arrXml['slides']['@attributes']['x'] = $default['sx'];
        $arrXml['slides']['@attributes']['y'] = $default['sy'];
        $arrXml['slides']['@attributes']['width'] = $default['swidth'];
        $arrXml['slides']['@attributes']['height'] = $default['sheight'];
        foreach ($slides as $key => $value) {
            if ($default['posts_fit'] != '' && $default['posts_fit'] != 'default') {
                $value['fit'] = $default['posts_fit'];
            }
            $arrXml['slides'][$key]['slide']['url'] = "<![CDATA[" . (cu3er__isHttpPath($value['image']) ? $value['image'] : cu3er__removeDomainName($value['image'])) . "]]>";
            if ($value['duration'] != $default['duration']) {
                $arrXml['slides'][$key]['slide']['@attributes']['time'] = $value['duration'];
            }
            $arrXml['slides'][$key]['slide']['image']['@attributes']['align_pos'] = $value['align_pos'];
            $arrXml['slides'][$key]['slide']['image']['@attributes']['fit'] = $value['fit'];
            $arrXml['slides'][$key]['slide']['@attributes']['use_image'] = $value['use_image'] == 'no' ? 'false' : 'true';
            $arrXml['slides'][$key]['slide']['image']['@attributes']['x'] = $value['x'];
            $arrXml['slides'][$key]['slide']['image']['@attributes']['y'] = $value['y'];
            $arrXml['slides'][$key]['slide']['image']['@attributes']['scaleX'] = $value['scaleX'];
            $arrXml['slides'][$key]['slide']['image']['@attributes']['scaleY'] = $value['scaleY'];
            $arrXml['slides'][$key]['slide']['caption'] = "<![CDATA[" . $value['caption'] . "]]>";
            if ($arrXml['slides'][$key]['slide']['caption'] == '<![CDATA[]]>') {
                $arrXml['slides'][$key]['slide']['caption'] = '';
            }
            if ($value['transparent'] != $default['transparent']) {
                $arrXml['slides'][$key]['slide']['@attributes']['transparent'] = $value['transparent'];
            }
            if ($value['color'] != $default['color']) {
                $arrXml['slides'][$key]['slide']['@attributes']['color'] = str_replace('#', '0x', $value['color']);
            }
            if ($value['link'] != $default['link']) {
                $arrXml['slides'][$key]['slide']['link']['vle'] = "<![CDATA[" . $value['link'] . "]]>";
            }
            if ($value['target'] != $default['target']) {
                $arrXml['slides'][$key]['slide']['link']['@attributes']['target'] = $value['target'];
            }
            if ($arrXml['slides'][$key]['slide']['link']['vle'] == '<![CDATA[]]>') {
                $arrXml['slides'][$key]['slide']['link']['vle'] = '';
            }
            $arrXml['slides'][$key]['slide']['description']['heading'] = "<![CDATA[" . $value['heading'] . "]]>";
            if ($arrXml['slides'][$key]['slide']['description']['heading'] == '<![CDATA[]]>') {
                $arrXml['slides'][$key]['slide']['description']['heading'] = '';
            }
            $arrXml['slides'][$key]['slide']['description']['paragraph'] = "<![CDATA[" . $value['paragraph'] . "]]>";
            if ($arrXml['slides'][$key]['slide']['description']['paragraph'] == '<![CDATA[]]>') {
                $arrXml['slides'][$key]['slide']['description']['paragraph'] = '';
            }
            if ($value['dlink'] != $default['dlink']) {
                $arrXml['slides'][$key]['slide']['description']['link']['vle'] = "<![CDATA[" . $value['dlink'] . "]]>";
            }
            if ($arrXml['slides'][$key]['slide']['description']['link']['vle'] == '<![CDATA[]]>') {
                $arrXml['slides'][$key]['slide']['description']['link']['vle'] = '';
            }
            if ($value['dtarget'] != $default['dtarget']) {
                $arrXml['slides'][$key]['slide']['description']['link']['@attributes']['target'] = $value['dtarget'];
            }
            if ($value['type'] != $default['type']) {
                $arrXml['slides'][$key]['transition']['@attributes']['type'] = $value['type'];
            }
            if ($value['columns'] != $default['columns']) {
                $arrXml['slides'][$key]['transition']['@attributes']['columns'] = $value['columns'];
            }
            if ($value['rows'] != $default['rows']) {
                $arrXml['slides'][$key]['transition']['@attributes']['rows'] = $value['rows'];
            }
            if ($value['type2d'] != $default['type2d']) {
                $arrXml['slides'][$key]['transition']['@attributes']['type2D'] = $value['type2d'];
            }
            if ($value['flipAngle'] != $default['flipAngle']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipAngle'] = $value['flipAngle'];
            }
            if ($value['flipAngle'] != $default['flipAngle']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipOrder'] = $value['flipOrder'];
            }
            if ($value['flipShader'] != $default['flipShader']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipShader'] = $value['flipShader'];
            }
            if ($value['flipOrderFromCenter'] != $default['flipOrderFromCenter']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipOrderFromCenter'] = $value['flipOrderFromCenter'];
            }
            if ($value['flipDirection'] != $default['flipDirection']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipDirection'] = $value['flipDirection'];
            }
            if ($value['flipColor'] != $default['flipColor']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipColor'] = str_replace('#', '0x', $value['flipColor']);
            }
            if ($value['flipBoxDepth'] != $default['flipBoxDepth']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipBoxDepth'] = $value['flipBoxDepth'];
            }
            if ($value['flipDepth'] != $default['flipDepth']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipDepth'] = $value['flipDepth'];
            }
            if ($value['flipEasing'] != $default['flipEasing']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipEasing'] = $value['flipEasing'];
            }
            if ($value['flipDuration'] != $default['flipDuration']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipDuration'] = $value['flipDuration'];
            }
            if ($value['flipDelay'] != $default['flipDelay']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipDelay'] = $value['flipDelay'];
            }
            if ($value['flipDelayRandomize'] != $default['flipDelayRandomize']) {
                $arrXml['slides'][$key]['transition']['@attributes']['flipDelayRandomize'] = $value['flipDelayRandomize'];
            }
            $image_url = $fImages . $value['image'];
            $image_alt = $value['seo_img_alt'];
            $heading = $value['heading'];
            $paragraph = $value['paragraph'];
            $caption = $value['caption'];
            $seo_text = $value['seo_text'];
            $slide_link = $value['link'];
            $slide_link_target = $value['target'];
            if ($slide_link_target == '') {
                $slide_link_target = $value['target'];
            }
            $desc_link = $value['dlink'];
            $desc_link_target = $value['dtarget'];
            if ($desc_link_target == '') {
                $desc_link_target = $default['dtarget'];
            }
            if ($slide_link == '') {
                $slide_link = $value['link'];
            }
            if ($desc_link == '') {
                $desc_link = $value['dlink'];
            }
            $seo_str .= "<li>";
            if ($slide_link != "") {
                $seo_str .= '<a href="' . $slide_link . '" target="' . $slide_link_target . '">' . "\n";
            }
            if ($default['seo_show_image'] == 'yes' && $value['seo_show_image'] != 'no' || $value['seo_show_image'] == 'yes') {
                $seo_str .= "<img src='{$image_url}' alt='" . addslashes($image_alt) . "'/>\n";
            }
            if ($slide_link != "" && $desc_link != "") {
                $seo_str .= '</a><a href="' . $desc_link . '" target="' . $desc_link_target . '">' . "\n";
            } elseif ($desc_link != '') {
                $seo_str .= '<a href="' . $desc_link . '" target="' . $desc_link_target . '">' . "\n";
            }
            if ($default['seo_show_heading'] == 'yes' || $value['seo_show_heading'] == 'yes' && $heading != "") {
                $seo_str .= "<h2>" . $heading . "</h2>" . "\n";
            }
            if ($default['seo_show_paragraph'] == 'yes' || $value['seo_show_paragraph'] == 'yes' && $paragraph != "") {
                $seo_str .= "<p>" . $paragraph . "</p>" . "\n";
            }
            if ($desc_link != "") {
                $seo_str .= "</a>" . "\n";
            }
            if ($slide_link != "" && $desc_link == "") {
                $seo_str .= '</a>' . "\n";
            }
            if ($default['seo_show_caption'] == 'yes' || $value['seo_show_caption'] == 'yes' && $caption != "") {
                $seo_str .= "<p>" . $caption . "</p>" . "\n";
            }
            if ($seo_text != "") {
                $seo_str .= "<p>" . $seo_text . "</p>" . "\n";
            }
            $seo_str .= "</li>" . "\n";
        }
        $seo_str = '<ul style="position:absolute; left:-50000px;">' . $seo_str . '</ul>';
        $array = cu3er__array_remove_empty($arrXml);
        $data['data'] = $array;
        if (trim($settings['licence']) != '') {
            $data['data'][0]['licence'] = '<![CDATA[' . urldecode(trim($settings['licence'])) . ']]>';
        }
        if (trim($settings['licence1']) != '') {
            $data['data'][1]['licence'] = '<![CDATA[' . urldecode(trim($settings['licence1'])) . ']]>';
        }
        if (trim($settings['licence2']) != '') {
            $data['data'][2]['licence'] = '<![CDATA[' . urldecode(trim($settings['licence2'])) . ']]>';
        }
        if (trim($settings['licence3']) != '') {
            $data['data'][3]['licence'] = '<![CDATA[' . urldecode(trim($settings['licence3'])) . ']]>';
        }
        if (trim($settings['licence4']) != '') {
            $data['data'][4]['licence'] = '<![CDATA[' . urldecode(trim($settings['licence4'])) . ']]>';
        }
        $toWrite = urlencode(cu3er__array2xml($data)) . '|||||' . $seo_str;
        if ($slideshowS['project_location'] != '') {
            $oldDir = $slideshowS['project_location'];
        } else {
            $pth = explode("/", $slideshowS['xml_location']);
            $delFlag = true;
            $size = sizeof($pth);
            $wpContentDirArray = explode('/', WP_CONTENT_DIR);
            $wpContentDir = $wpContentDirArray[sizeof($wpContentDirArray) - 1];
            for ($i = 0; $i < $size; $i++) {
                if ($pth[$i] == $wpContentDir) {
                    unset($pth[$i], $pth[$i + 1]);
                    $delFlag = false;
                }
                if ($delFlag == true) {
                    unset($pth[$i]);
                }
            }
            $pthOld = $pth;
            unset($pthOld[9], $pthOld[10], $pthOld[11], $pthOld[12]);
            $oldDir = $uploadsDir['basedir'] . '/' . implode("/", $pthOld);
        }
        if (!file_exists($oldDir . '/CU3ER.txt')) {
            @touch($oldDir . '/CU3ER.txt');
        }
        @chmod($oldDir . '/CU3ER.txt', 0777);
        $handle = fopen($oldDir . '/CU3ER.txt', 'w+');
        fwrite($handle, $toWrite);
        fclose($handle);
        @chmod($oldDir . '/CU3ER.txt', 0755);
        if ($ret) {
            return $toWrite;
        }
    }
}
コード例 #2
0
     $xmlStr = cu3er__our_fopen($testXmlFile);
     if ($xmlStr == false) {
         echo $cu3er_messages['missingXML'];
     } else {
         $xmlStr = preg_replace('/\\<transition(.*?)\\>/', '<transition empty="true"$1>', $xmlStr);
         $arrXml = $xml_debugger->parse($xmlStr);
     }
 }
 if (!is_array($arrXml)) {
     echo $cu3er_messages['notXML'];
 } else {
     $xml_parse = simplexml_load_string($xmlStr);
     /*@chmod($testXmlFile, 0777);
     		@chmod($cu3er_pathDir . '/CU3ER.swf', 0777);*/
     cu3er__chmodDir($dir, 0777, 0777);
     $arrXml = cu3er__array_remove_empty($arrXml['data']);
     // everything is ok //
     if ($arrXml['project_settings']['width'] == '') {
         if ($zipFileType) {
             $newStr = file_get_contents($dir . '/' . 'embed_example.html');
             preg_match_all('/swfobject\\.embedSWF\\((.*?)\\)/', $newStr, $values);
             $dimensions = explode(",", $values[1][0]);
         } else {
             $dimensions[2] = $arrXml['slides']['attr']['width'];
             $dimensions[3] = $arrXml['slides']['attr']['height'];
         }
     }
     $xml['Settings'] = array('cu3er_location' => $zipFileType ? $cu3er_pathDir . '/CU3ER.swf' : '', 'js_location' => $zipFileType ? $cu3er_pathDir . '/js/jquery.cu3er.js' : '', 'js_player_location' => $zipFileType ? $cu3er_pathDir . '/js/jquery.cu3er.player.js' : '', 'licence' => urlencode($licence));
     if (cu3er__isHttpPath($arrXml['settings']['folder_images']['value'])) {
         $urlFolderPath = true;
     }
コード例 #3
0
			<?php 
foreach ($slides as $slide) {
    ?>
			<div class="block">
				<div class="block-head">
					<div class="block-toggle"></div>
					<h4>#<?php 
    echo $i + 1;
    ?>
 Slide & Transition</h4> <span class="delete" style="float:right;color:red;"><a href="#">Delete</a></span> <span class="duplicate" style="float:right;"><a href="#" rel="<?php 
    echo $i;
    ?>
">Duplicate</a> </span>
				</div>
				<?php 
    $slide = cu3er__array_remove_empty($slide);
    ?>
				<?php 
    $original = $slide;
    ?>
				<?php 
    $slide = array_merge($cu3er_defaults, $default, $slide);
    ?>
				<div class="block-inner" style="display: none;">
					<div class="transHalf">
						<h4><span>Slide image</span></h4>
						<div class="inputs slide">
							<span class="imageHolder">
								<?php 
    if (cu3er__isImage($slideshow['images_folder'] . '/' . $slide['image'])) {
        $image = $slideshow['images_folder'] . '/' . $slide['image'];