public function sidebar()
 {
     // not logged in users don't need the sidebar
     if (!$this->tank_auth->is_logged_in()) {
         return false;
     }
     $result = "";
     foreach ($this->sidebar_val() as $key => $item) {
         // segment 2 contains what's currently active so we can set it lighted up
         if ($this->uri->segment(2) == $key) {
             $active = TRUE;
         } else {
             $active = FALSE;
         }
         if (($this->tank_auth->is_admin() || $this->tank_auth->is_group($item["level"])) && !empty($item)) {
             $result .= '<h5><a href="' . (substr($item["default"], 0, 7) == 'http://' ? $item["default"] : site_url(array("admin", $key, $item["default"]))) . '" ' . (substr($item["default"], 0, 7) == 'http://' ? 'target="_blank"' : '') . '><img src="' . icons($item['icon']) . '" class="icon">' . $item["name"] . '</a></h5>';
             $result .= '<ul class="sidebar">';
             foreach ($item["content"] as $subkey => $subitem) {
                 if ($active && $this->uri->segment(3) == $subkey) {
                     $subactive = TRUE;
                 } else {
                     $subactive = FALSE;
                 }
                 if ($this->tank_auth->is_admin() || $this->tank_auth->is_group($subitem["level"])) {
                     //if($subitem["name"] == $_GET["location"]) $is_active = " active"; else $is_active = "";
                     $is_active = "";
                     $result .= '<li class="' . ($subactive ? 'active' : '') . '"><a href="' . (substr($subkey, 0, 7) == 'http://' ? $subkey : site_url(array("admin", $key, $subkey))) . '"  ' . (substr($subkey, 0, 7) == 'http://' ? 'target="_blank"' : '') . '><img src="' . icons($subitem['icon'], 16) . '" class="icon icon-small">' . $subitem["name"] . '</a></li>';
                 }
             }
             $result .= '</ul>';
         }
     }
     return $result;
 }
Beispiel #2
0
 function preferences()
 {
     $this->viewdata["function_title"] = _("Preferences");
     $form = array();
     if (find_imagick()) {
         $imagick_status = '<span class="label success">' . _('Found and Working') . '</span>';
     } else {
         if (!$this->fs_imagick->exec) {
             $imagick_status = '<span class="label important">' . _('Not Available') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(_('You must have Safe Mode turned off and the exec() function enabled to allow ImageMagick to process your images. Please check the information panel for more details.')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
         } else {
             if (!$this->fs_imagick->found) {
                 $imagick_status = '<span class="label important">' . _('Not Found') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(_('You must provide the correct path to the "convert" binary on your system. This is typically located under /usr/bin (Linux), /opt/local/bin (Mac OSX) or the installation directory (Windows).')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
             } else {
                 if (!$this->fs_imagick->available) {
                     $imagick_status = '<span class="label important">' . _('Not Working') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(sprintf(_('There has been an error encountered when testing your ImageMagick installation. To manually check for errors, access your server via shell or command line and type: %s'), '<br/><code>' . $this->fs_imagick->found . ' -version</code>')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
                 }
             }
         }
     }
     $form[] = array(_('Path to ImageMagick') . ' ' . $imagick_status, array('type' => 'input', 'name' => 'fs_serv_imagick_path', 'placeholder' => '/usr/bin', 'preferences' => 'fs_gen', 'help' => sprintf(_('FoOlSlide uses %s via command line to maximize the processor power for processing images. If ImageMagick %s automatically, enter the location of the "convert" binary on your server in the field above.'), '<a href="#" rel="popover-below" title="ImageMagick" data-content="' . _('This is a library used to dynamically create, edit, compose or convert images.') . '">ImageMagick</a>', '<a href="#" rel="popover-below" title="' . _('ImageMagick Binary') . '" data-content="' . htmlspecialchars(_('This is typically located under /usr/bin (Linux), /opt/local/bin (Mac OSX) or the installation directory (Windows).')) . '" >' . _('can\'t be found') . '</a>')));
     if ($post = $this->input->post()) {
         $this->_submit($post, $form);
         redirect('admin/system/preferences');
     }
     // create a form
     $table = tabler($form, FALSE);
     $data['table'] = $table;
     // print out
     $this->viewdata["main_content_view"] = $this->load->view("admin/preferences/general.php", $data, TRUE);
     $data["form_title"] = _("Preferences");
     $this->viewdata["main_content_view"] = $this->load->view("admin/system/preferences", $data, TRUE);
     $this->load->view("admin/default.php", $this->viewdata);
 }
Beispiel #3
0
                 echo '<option value="0">Выберите категорию</option>';
                 foreach ($output[0] as $key => $data) {
                     $disabled = !empty($data['closed']) ? ' disabled="disabled"' : '';
                     echo '<option value="' . $data['cats_id'] . '"' . $disabled . '>' . $data['cats_name'] . '</option>';
                     if (isset($output[$key])) {
                         foreach ($output[$key] as $datasub) {
                             $disabled = !empty($datasub['closed']) ? ' disabled="disabled"' : '';
                             echo '<option value="' . $datasub['cats_id'] . '"' . $disabled . '>– ' . $datasub['cats_name'] . '</option>';
                         }
                     }
                 }
                 echo '</select><br /><br />';
                 echo '<input type="checkbox" name="all" onchange="for (i in this.form.elements) this.form.elements[i].checked = this.checked" /> <b>Отметить все</b><br />';
                 foreach ($files as $file) {
                     $ext = getExtension($file);
                     echo '<input type="checkbox" name="files[]" value="' . $file . '" /> <img src="/images/icons/' . icons($ext) . '" alt="image" /> ' . $file . '<br />';
                 }
                 echo '<input value="Импортировать" type="submit" /></form></div><br />';
                 echo 'Всего файлов: ' . $total . '<br /><br />';
             } else {
                 show_error('В директории нет файлов для импорта!');
             }
         } else {
             show_error('Категории файлов еще не созданы!');
         }
     } else {
         show_error('Директория для импорта файлов не создана!');
     }
 } else {
     show_error('Импортировать файлы могут только суперадмины!');
 }
Beispiel #4
0
        $files_sorted = sort_by_date($files['date'], $sort_order);
    }
    if ($sort_order == 1) {
        $files_sorted = array_reverse($files_sorted, TRUE);
    }
} else {
    $files_sorted = array();
}
//if there are no files in the current directory
//Sort the folders and files array -done
//Icons
if ($view_mode == 0) {
    $files_icons_array = icons($files['name'], $view_mode);
    $folder_icon = $view_mode == 0 ? '<img border="0" src="dirLIST_files/icons_large/folder.png">' : '<img src="dirLIST_files/icons/folder.gif"> ';
} elseif ($view_mode == 1 && $file_icons) {
    $files_icons_array = icons($files['name'], $view_mode);
    $folder_icon = $view_mode == 0 ? '<img border="0" src="dirLIST_files/icons_large/folder.png">' : '<img src="dirLIST_files/icons/folder.gif"> ';
}
//Icons -done
//Hide file extensions if enabled
$files['name_with_ext'] = $files['name'];
if ($hide_file_ext == 1) {
    foreach ($files['name'] as $key => $val) {
        $files['name'][$key] = remove_ext($val);
    }
}
//Hide file extensions if enabled -done
if (!empty($folders['name']) || !empty($files['name'])) {
    ?>

<table width="<?php 
Beispiel #5
0
if (preg_match('/nginx/i', $_SERVER["SERVER_SOFTWARE"])) {
    $information['server']['data'][] = array('name' => 'Nginx Upload Size', 'title' => _('Nginx Upload Size'), 'value' => _('This value cannot be checked via PHP.'), 'text' => _('The Nginx web server has its own internal upload limit variable. If you are receiving upload errors, and your PHP configuration looks fine, check this variable in your Nginx configuration file.') . '</p><p class="vartext">' . _('Variable') . ': client_max_body_size (in nginx.conf)</p>');
}
$information['software'] = array('name' => 'Software Information', 'title' => _('Software Information'), 'data' => array(array('name' => 'FoOlSlide Version', 'title' => _('FoOlSlide Version'), 'value' => FOOLSLIDE_VERSION, 'text' => _('The version of FoOlSlide that you are currently running on your server.'), 'alert' => array('type' => 'success', 'type_text' => _('New Version Available'), 'title' => _('New Version Available'), 'text' => _('Upgrading FoOlSlide ensures that you have the most secure, stable and feature enhanced release.') . '<p class="vartext">' . _('Suggested') . ': ' . get_setting('fs_cron_autoupgrade_version') . '</p>', 'if' => get_setting('fs_cron_autoupgrade_version') && version_compare(FOOLSLIDE_VERSION, get_setting('fs_cron_autoupgrade_version')) < 0)), array('name' => 'Environment', 'title' => _('Environment'), 'value' => ucfirst(ENVIRONMENT), 'text' => _('The environment FoOlSlide is current running as on the server.'))));
$information['configuration'] = array('name' => 'PHP Configuration', 'title' => _('PHP Configuration'), 'text' => _('PHP settings can be easily changed by editing your php.ini file.'), 'data' => array(array('name' => 'php.ini Location', 'title' => _('php.ini Location'), 'value' => php_ini_loaded_file(), 'text' => _('This is the location of the file to edit to change the following variables.')), array('name' => 'Safe Mode', 'title' => _('Safe Mode'), 'value' => ini_get('safe_mode') ? _('On') : _('Off'), 'text' => _('The PHP safe mode is an attempt to solve the shared-server security problems and disables many important PHP functions. This is mainly used by shared hosting services to avoid implementing correct security fixes for shared-server environments.') . '</p><p class="vartext">' . _('Variable') . ': safe_mode</p>', 'alert' => array('type' => 'important', 'title' => _('Safe Mode'), 'text' => _('Safe Mode has been enabled on your PHP installation. This setting has nothing to do with security, and it\'s used by shared server hosts to limit your actions. This variable should be turned off for FoOlSlide to function correctly.') . '<p class="vartext">' . _('Suggested') . ': Off</p>', 'if' => ini_get('safe_mode'))), array('name' => 'Allow URL fopen', 'title' => _('Allow URL fopen'), 'value' => ini_get('allow_url_fopen') ? _('On') : _('Off'), 'text' => _('This function allows PHP to use URL-aware fopen wrappers to access remote files via FTP or HTTP protocol.') . '</p><p class="vartext">' . _('Variable') . ': allow_url_fopen</p>', 'alert' => array('type' => 'important', 'title' => _('Disabled'), 'text' => _('Your PHP configuration currently has URL-aware fopen wrappers disabled. This affects FoOlSlide functions that require accessing remote files in case cURL is not installed on the system. If it is possible, this variable should be enabled with cURL installed as well.') . '<p class="vartext">' . _('Suggested') . ': On</p>', 'if' => !ini_get('allow_url_fopen'))), array('name' => 'Max Execution Time', 'title' => _('Max Execution Time'), 'value' => ini_get('max_execution_time'), 'text' => _('This is the maximum time in seconds a script is allowed to run before it is terminated by the parser.') . '<p class="vartext">' . _('Variable') . ': max_execution_time</p>', 'alert' => array('type' => 'notice', 'title' => _('Low Value'), 'text' => _('Your current value for max execution time is low. This option affects functions that require large amounts of processing time, such as processing images. If your server doesn\'t have a powerful processor or you\'re processing large amounts of images, this value must be set as high as the total processing time taken to complete the function.') . '<p class="vartext">' . _('Suggested') . ': 120+</p>', 'if' => intval(ini_get('max_execution_time')) < 110)), array('name' => 'File Uploads', 'title' => _('File Uploads'), 'value' => ini_get('file_uploads') ? _('Enabled') : _('Disabled'), 'text' => _('This states whether or not to allow HTTP file uploads.') . '<p class="vartext">' . _('Variable') . ': file_uploads</p>', 'alert' => array('type' => 'important', 'title' => _('Disabled'), 'text' => _('Your PHP configuration currently has file uploads disabled. This variable must be enabled or FoOlSlide will not operate correctly.') . '<p class="vartext">' . _('Suggested') . ': On</p>', 'if' => !ini_get('file_uploads'))), array('name' => 'Max POST Size', 'title' => _('Max POST Size'), 'value' => ini_get('post_max_size'), 'text' => _('This is max size of post data allowed.') . '<p class="vartext">' . _('Variable') . ': post_max_size</p>', 'alert' => array('type' => 'notice', 'title' => _('Low Value'), 'text' => _('Your current value for POST size is low. This variable should generally be set at a higher value to accomodate and ensure that all of your chapters will be uploaded.') . '<p class="vartext">' . _('Suggested') . ': 16M+</p>', 'if' => intval(substr(ini_get('post_max_size'), 0, -1)) < 16)), array('name' => 'Max Upload Size', 'title' => _('Max Upload Size'), 'value' => ini_get('upload_max_filesize'), 'text' => _('This is the maximum size allowed for an uploaded file.') . '<p class="vartext">' . _('Variable') . ': upload_max_filesize</p>', 'alert' => array('type' => 'notice', 'title' => _('Low Value'), 'text' => _('Your current value for max upload size is low. This variable should generally be set at a higher value to accommodate and allow your largest chapter to be uploaded.') . '<p class="vartext">' . _('Suggested') . ': 16M+</p>', 'if' => intval(substr(ini_get('upload_max_filesize'), 0, -1)) < 16)), array('name' => 'Max File Uploads', 'title' => _('Max File Uploads'), 'value' => ini_get('max_file_uploads'), 'text' => _('This is the maximum number of files allowed to be uploaded simultaneously.') . '<p class="vartext">' . _('Variable') . ': max_file_uploads</p>', 'alert' => array('type' => 'notice', 'title' => _('Low Value'), 'text' => _('Your current value for max file uploads is low. This variable should generally be set at a higher value than the number of pages your chapters may have.') . '<p class="vartext">' . _('Suggested') . ': 54+</p>', 'if' => intval(ini_get('max_file_uploads')) < 54))));
$information['extensions'] = array('name' => 'Extensions', 'title' => _('Extensions'), 'data' => array(array('name' => 'cURL', 'title' => 'cURL', 'value' => extension_loaded('curl') ? _('Installed') : _('Not Installed'), 'text' => _('This is a library used to communicate with different types of servers with many types of protocols.')), array('name' => 'GD2', 'title' => 'GD2', 'value' => extension_loaded('gd') ? _('Installed') : _('Missing'), 'text' => _('This is a library used to dynamically create images and thumbnails.')), array('name' => 'ImageMagick', 'title' => 'ImageMagick', 'value' => find_imagick() ? _('Installed') : _('Not Installed'), 'text' => _('This is a library used to dynamically create, edit, compose or convert images.') . '<p class="vartext">' . _('Optional') . '</p>')));
// Output Tables
foreach ($information as $key => $item) {
    echo '<h4>' . $item['title'] . '</h4>';
    if (isset($item['text'])) {
        echo '<p>' . $item['text'] . '</p>';
    }
    echo '<table class="zebra-striped fixed-table"><tbody>';
    foreach ($item['data'] as $subkey => $subitem) {
        $tooltip = isset($subitem['text']) && $subitem['text'] != "" ? '<a rel="popover-right" href="#" data-content="' . htmlspecialchars($subitem['text']) . '" data-original-title="' . htmlspecialchars($subitem['title']) . '"><img src="' . icons(219, 16) . '" class="icon icon-small"></a>' : '';
        $tooltip2 = isset($subitem['alert']) && $subitem['alert']['text'] != "" && $subitem['alert']['if'] ? '<span class="label ' . $subitem['alert']['type'] . '">' . _(isset($subitem['alert']['type_text']) ? $subitem['alert']['type_text'] : $subitem['alert']['type']) . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars($subitem['alert']['text']) . '" data-original-title="' . htmlspecialchars($subitem['alert']['title']) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>' : '';
        echo '<tr><td>' . $subitem['title'] . ' ' . $tooltip . '</td><td>' . $subitem['value'] . ' ' . $tooltip2 . '</td></tr>';
    }
    echo '</tbody></table>';
}
?>

		<?php 
echo _('If you are asked to provide an output of your server information, please click the "Output Server Information" button at the top right and provide it to us via <a href="http://pastebin.com">Pastebin</a> or some similar service.');
?>
	</div>
</div>

<div id="modal-for-information" class="modal hide fade" style="display: none">
	<div class="modal-header">
		<a class="close" href="#">&times;</a>
Beispiel #6
0
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page())) {
    echo " | {$site_description}";
}
if ($paged >= 2 || $page >= 2) {
    echo ' | ' . sprintf(__('Page %s', 'lgdcom'), max($paged, $page));
}
?>
</title>
	
	<link rel="stylesheet" type="text/css" media="all" href="<?php 
bloginfo('stylesheet_url');
?>
" />
	<?php 
icons();
?>
	
	<?php 
if (is_singular() && get_option('thread_comments')) {
    wp_enqueue_script('comment-reply');
}
?>
	<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />
	
	<!--[if lt IE 9]>
	<link rel="stylesheet" href="<?php 
echo get_template_directory_uri();
Beispiel #7
0
              <figure class="header">
                  <a class="sliderlink" href="<?php 
    the_permalink();
    ?>
">
                      <img src="/wp-includes/images/blank.gif" style="background-image:url(<?php 
    echo $img;
    ?>
)" title="<?php 
    the_title();
    ?>
">
                  </a>
                  <span class="icons"><?php 
    icons(true, true);
    ?>
</span>
                  <figcaption>
                      <h1 class="entry-title">
                        <?php 
    echo get_the_title();
    ?>
                      </h1>

                      <h2><?php 
    $bla = get_the_excerpt();
    echo wp_strip_all_tags($bla);
    ?>
                      </h2>
Beispiel #8
0
        if (!empty($topics['posts_files'])) {
            ?>
			<?php 
            if (isset($topics['posts_files'][$data['posts_id']])) {
                ?>
				<div class="hiding"><i class="fa fa-paperclip" aria-hidden="true"></i> <b>Прикрепленные файлы:</b><br />
				<?php 
                foreach ($topics['posts_files'][$data['posts_id']] as $file) {
                    ?>
					<?php 
                    $ext = getExtension($file['file_hash']);
                    ?>


					<img src="/images/icons/<?php 
                    echo icons($ext);
                    ?>
" alt="image" />
					<a href="/upload/forum/<?php 
                    echo $topics['topics_id'];
                    ?>
/<?php 
                    echo $file['file_hash'];
                    ?>
"><?php 
                    echo $file['file_name'];
                    ?>
</a> (<?php 
                    echo formatsize($file['file_size']);
                    ?>
)<br />
Beispiel #9
0
         $arrext = array('xml', 'wml', 'asp', 'aspx', 'shtml', 'htm', 'phtml', 'html', 'php', 'htt', 'dat', 'tpl', 'htaccess', 'pl', 'js', 'jsp', 'css', 'txt', 'sql', 'gif', 'png', 'bmp', 'wbmp', 'jpg', 'jpeg');
         if ($start < 0 || $start >= $total) {
             $start = 0;
         }
         if ($total < $start + $config['ziplist']) {
             $end = $total;
         } else {
             $end = $start + $config['ziplist'];
         }
         for ($i = $start; $i < $end; $i++) {
             if ($list[$i]['folder'] == 1) {
                 $filename = substr($list[$i]['filename'], 0, -1);
                 echo '<img src="/images/icons/dir.gif" alt="image" /> <b>Директория ' . $filename . '</b><br />';
             } else {
                 $ext = getExtension($list[$i]['filename']);
                 echo '<img src="/images/icons/' . icons($ext) . '" alt="image" /> ';
                 if (in_array($ext, $arrext)) {
                     echo '<a href="zip.php?act=preview&amp;id=' . $id . '&amp;view=' . $list[$i]['index'] . '&amp;start=' . $start . '">' . $list[$i]['filename'] . '</a>';
                 } else {
                     echo $list[$i]['filename'];
                 }
                 echo ' (' . formatsize($list[$i]['size']) . ')<br />';
             }
         }
         page_strnavigation('zip.php?id=' . $id . '&amp;', $config['ziplist'], $start, $total);
         echo '<img src="/images/img/back.gif" alt="image" /> <a href="down.php?cid=' . $downs['cats_id'] . '">' . $downs['cats_name'] . '</a><br />';
     } else {
         show_error('Ошибка! В данном архиве нет файлов!');
     }
 } else {
     show_error('Ошибка! Невозможно открыть архив!');
Beispiel #10
0
function content($pag,$acao,$con) {
	if ($acao == "" || $acao == "voltar") {
		if (isset($_GET['info']))
			$info = anti_injection($_GET['info']);
		else
			$info = 1;
		
		if ($pag == 1 || $pag == 3) {
			$sql = "SELECT * FROM pagina WHERE id = " . $pag;
			$res = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
				
			$txt = mysql_fetch_array($res);
			$num = mysql_num_rows($res);
				
			echo "<br /><span class=\"corpo\">" . str_replace("<p>&nbsp;</p><p>&nbsp;</p>", "", $txt['texto']) . "</span>";			
			
			$ini = isset($_GET['ini'])? $_GET['ini'] : 0;
			
			echo $pag == 3? "<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;": "";
			
			icons($pag,$ini,$pag);
		}
		
		else if ($pag == 2) {
			$sql = "SELECT * FROM pagina WHERE id = 7";
			$rrr = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
			$tit = mysql_fetch_array($rrr);
			
			echo "<br /><span class=\"corpo\">" . $tit['texto'] . "</span>";
			
			$ini = isset($_GET['ini'])? $_GET['ini'] : 0;
			icons(7,$ini,$pag);
		}
		
		else if ($pag == 4) {
			$tit = $info == 1? "Or&ccedil;amento Online" : "Envie-nos um Depoimento";
			moreinfo($info, $tit);
		}
		
		else if ($pag == 5) {
			echo "<div id=\"Icones\">";
			
			$sql0 = "SELECT * FROM pagina WHERE tipo > 5";
			$res0 = mysql_query($sql0,$con) or die ("Erro: " . $sql0 . "<br />" . mysql_error($con));
			$num0 = mysql_num_rows($res0);
			
			echo "<br /><h3><b>Galerias de imagens</b></h3><br />";
			
			echo "<p><a href=\"?pag=2&tipo=1&ok=" . $tipo . "\">Casamento na praia</a></p>";
			for ($i = 0; $i <= $num0; $i++) {
				$tip0 = $i != 0? mysql_fetch_array($res0) : 0;
				$tipo = $i == 0? 4 : $tip0['id'];
				
				echo "<p><a href=\"?pag=" . $tip0['id'] . "\">" . $tip0['titulo'] . "</a></p>";
			}
			echo "</div>";
			
			$sql = "SELECT * FROM videos ORDER BY ordem,id ASC";
			$rrr = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
			$num = mysql_num_rows($rrr);
			
			if ($num > 0) {
				//echo "<div id=\"Videos\">";
				echo "<h4>Galeria de V&iacute;deos</h4>";
				echo "<table cellpadding=\"0\" width=\"100%\" cellspacing=\"10\" border=\"0\">";
				
				while ($tit = mysql_fetch_array($rrr)) {
					echo "<tr><td width=\"100\">";
					
					echo "<a href=\"https://www.youtube.com/watch?v=" . $tit['chave'] . "\" target=\"_blank\">";
					echo "<img alt=\"Miniatura\" src=\"//i1.ytimg.com/vi/" . $tit['chave'] . "/mqdefault.jpg\" data-thumb=\"//i1.ytimg.com/vi/" . $tit['chave'] . "/mqdefault.jpg\" width=\"185\" data-group-key=\"thumb-group-0\" align=\"left\"></a></td>";
					echo "<td valign=\"top\"><a href=\"https://www.youtube.com/watch?v=" . $tit['chave'] . "\" target=\"_blank\">" . $tit['titulo'] . "</a></td></tr><tr><td colspan=\"2\"><hr /></td></tr>";
					
//					echo "</td><td valign=\"top\" width=\"80\"><span class=\"class2\"><b>" . $tit['legenda'] . "</b></span></td></tr>";
					
//					echo "<tr><td colspan=\"2\"><hr /></td></tr>";
				}
				echo "</table>";
				//echo "</div>";
				
				if (isset($_GET['video'])) {
					$sel = "SELECT * FROM foto WHERE id = " . $_GET['video'];
					$res = mysql_query($sel,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
					$vid = mysql_fetch_array($res);
					
					echo "<div id=\"Player\">";
					echo "<div id=\"div2\">";
					echo "<a href=\"index2.php?pag=5\" target=\"_top\">Fechar [X]&nbsp;&nbsp;&nbsp;</a></div>";
					echo "<embed src=\"imagens/" . $vid['arquivo'] . "\" width=\"360\" height=\"300\"></embed></div>";
				}
			}
		}
		
		else if ($pag == 6) {
			$ctrl = isset($_GET['ctrl'])? anti_injection($_GET['ctrl']) : 1;
			$sql  = "SELECT titulo, texto FROM pagina WHERE tipo = 2 ORDER BY id DESC";
			$res  = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
			$dep  = mysql_result($res,($ctrl-1),1);
			$ass  = mysql_result($res,($ctrl-1),0);
			$num  = mysql_num_rows($res);
			
			echo "<div id=\"Icones\">";
			if ($ctrl > 1)
				echo "<p align=\"center\"><a href=\"?pag=6&amp;ctrl=" . ($ctrl-1) . "\">Anterior</a> | ";
			else
				echo "<p align=\"center\">Anterior | ";
			if ($ctrl < $num)
				echo "<a href=\"?pag=6&amp;ctrl=" . ($ctrl+1) . "\">Pr&oacute;ximo</a></p>";
			else
				echo "Pr&oacute;ximo</p>";
			echo "<hr /><p align=\"center\"><a href=\"?pag=4&amp;info=4\">Envie-nos seu depoimento</a></p>";
			echo "</div>";
			
			echo $dep . "<br /><p align=\"right\"><i>" . $ass . "</i></p>";
		}
		
		else if ($pag == 7)
			moreinfo(4, "Entre em Contato");
			
		else {
			$sql = "SELECT * FROM pagina WHERE id = " . $pag;
			$res = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
			
			$txt = mysql_fetch_array($res);
			$num = mysql_num_rows($res);
			
			echo "<h1>" . $txt['titulo'] . "</h1>";
			echo "<br /><span class=\"corpo\">" . $txt['texto'] . "</span>";			
		
			$ini = isset($_GET['ini'])? $_GET['ini'] : 0;
			
			icons($pag,$ini,6);
		}
	}
	else if ($acao == "convite1" || $acao == "convite2") {
		@session_start();
		$target = $acao == "convite1"? "_blank" : "_self";
		
		echo "<br /><h1>P&aacute;gina dos Noivos</h1>";
		echo "<br />&nbsp;<center><span class=\"class2\">Digite o usu&aacute;rio e senha para acesso &agrave;s informa&ccedil;&otilde;es</span>";
		echo "<form action=\"../convite.php\" method=\"post\" target=\"" . $target . "\">";
		echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
		echo "<tr><td align=\"right\"><span class=\"class2b\">Usu&aacute;rio: </span></td><td><input type=\"text\" size=\"20\" name=\"usuario\" /></td></tr>";
		echo "<tr><td align=\"right\"><span class=\"class2b\">Senha: </span></td><td><input type=\"password\" size=\"20\" name=\"senha\" /></td></tr>";
		echo "</table><input type=\"submit\" size=\"20\" value=\"Entrar!\" /></form></center>";
		echo "<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;";
	}
	
	if (isset($_GET['foto']))
	{
		$foto = $_GET['foto'];
		echo "<div id=\"Foto3\">";
		
		$sql = "SELECT * FROM foto WHERE id = " . $foto . " ORDER BY ordem, id";
		$res = mysql_query($sql,$con) or die ("Erro: " . $sql . "<br />" . mysql_error($con));
		$fot = mysql_fetch_array($res);
		
		$info   = getimagesize("imagens/m-" . $fot['arquivo']); 
		$w      = $info[0];
		$h      = $info[1];
		
		if ($w > $h)
			echo "";
		echo "<center><img src=\"imagens/m-" . $fot['arquivo'] . "\"><center>";
		echo "</div>";
		
		echo "<div id=\"Sobre\">";
	?>
		<script language="javascript">
			if (AC_FL_RunContent == 0) {
				alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
			} else {
				AC_FL_RunContent(
					'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
					'width', '460',
					'height', '340',
					'src', 'sobre',
					'quality', 'high',
					'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
					'align', 'middle',
					'play', 'true',
					'loop', 'true',
					'scale', 'showall',
					'wmode', 'transparent',
					'devicefont', 'false',
					'id', 'sobre',
					'bgcolor', '#ffffff',
					'name', 'base',
					'menu', 'true',
					'allowScriptAccess','sameDomain',
					'movie', 'sobre',
					'salign', ''
					); //end AC code
			}
		</script>
	<?
	}
}