Author Topic: русские сюда памагите""!!!  (Read 15589 times)

0 Members and 1 Guest are viewing this topic.

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
русские сюда памагите""!!!
« on: December 26, 2007, 03:37:47 PM »
вот такая ситуация...

вот смотрите скрипт
выводит 5 изображение в столбик из галереи

Code: [Select]
<?php

define
('ROOT_PATH''/home/&#1090;&#1099;&#1097;/&#1087;&#1099;&#1094;/sait.ru/');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$num_images 5;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date 
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        ORDER BY a.image_date DESC 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$image_id $row['image_id'];
  
$cat_id $row['cat_id'];
  
$image_name $row['image_name'];
  
$image_comments $row['image_comments'];
  
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : "http://sait.ru/data/thumbnails/".$cat_id."/".$row['image_thumb_file'];

  echo 
"<p align=\"left\"><a href=\"http://sait.ru/details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"<b>$image_name</b><br>\n";
  echo 
"&#1050;&#1086;&#1084;&#1084;&#1077;&#1085;&#1090;&#1072;&#1088;&#1080;&#1080;: $image_comments\n";
}
?>

вот так это выглядит:



а мне надо чтобы было так:



и как вот это сделать???
как мне надо я сделал в паинте ;)
а что надо с крипте менять?? просто  я этот скрипт инкладю на сайт тоесть

Code: [Select]
ob_start();
include("../sait.ru/random_more_pics.php");
$script = ob_get_contents();
ob_end_clean();
$content .= $script;

это для slaed cms
« Last Edit: January 20, 2008, 01:35:19 PM by KurtW »

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: русские сюда памагите""!!!
« Reply #1 on: December 26, 2007, 04:15:56 PM »
help

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: русские сюда памагите""!!!
« Reply #2 on: December 26, 2007, 04:39:11 PM »
Hi,

wrong forum:

1: Problem with a custom template => post here in the thread from the template
2: Problem with standart templates => post here: http://www.4homepages.de/forum/index.php?board=12.0
3: Language: => in this thread: englis or german


KurtW

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: русские сюда памагите""!!!
« Reply #3 on: December 26, 2007, 06:01:26 PM »
Excuse has translated through the interpreter

Such situation...

Look script
Deduces 5 images in column from gallery


Code: [Select]
<?php

define
('ROOT_PATH''/home/&#38;#1090;&#38;#1099;&#38;#1097;/&#38;#1087;&#38;#1099;&#38;#1094;/sait.ru/');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
  return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$num_images 5;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date 
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        ORDER BY a.image_date DESC 
        LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
  
$image_id $row['image_id'];
  
$cat_id $row['cat_id'];
  
$image_name $row['image_name'];
  
$image_comments $row['image_comments'];
  
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : "http://sait.ru/data/thumbnails/".$cat_id."/".$row['image_thumb_file'];

  echo 
"<p align=\"left\"><a href=\"http://sait.ru/details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
  echo 
"<b>$image_name</b><br>\n";
  echo 
"&#38;#1050;&#38;#1086;&#38;#1084;&#38;#1084;&#38;#1077;&#38;#1085;&#38;#1090;&#38;#1072;&#38;#1088;&#38;#1080;&#38;#1080;: $image_comments\n";
}
?>


So it looks:



And it is necessary that was so:




And how it to make???

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: русские сюда памагите""!!!
« Reply #4 on: December 26, 2007, 06:09:50 PM »
it is only a html problem... (o:

try this:
Code: [Select]
<?php

define
('ROOT_PATH''/home/&#38;#38;#1090;&#38;#38;#1099;&#38;#38;#1097;/&#38;#38;#1087;&#38;#38;#1099;&#38;#38;#1094;/sait.ru/');

include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'includes/db_mysql.php');
include(
ROOT_PATH.'includes/constants.php');

$site_db = new Db($db_host$db_user$db_password$db_name);
function 
is_remote($file_name) {
    return (
preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i'$file_name)) ? 0;
}

$num_images 5;

$sql "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date
        FROM "
.IMAGES_TABLE." a, ".CATEGORIES_TABLE." b 
        WHERE a.image_active=1 
        AND a.cat_id = b.cat_id 
        AND b.auth_viewcat="
.AUTH_ALL.
        AND b.auth_viewimage="
.AUTH_ALL.
        ORDER BY a.image_date DESC 
        LIMIT 
$num_images";
$result $site_db->query($sql);

//start table
echo "<table><tr>";
while (
$row $site_db->fetch_array($result)){
    
$image_id $row['image_id'];
    
$cat_id $row['cat_id'];
    
$image_name $row['image_name'];
    
$image_comments $row['image_comments'];
    
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : "http://sait.ru/data/thumbnails/".$cat_id."/".$row['image_thumb_file'];

    
//make column
    
echo "<td>";
    echo 
"<a href=\"http://sait.ru/details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
    echo 
"<b>$image_name</b><br>\n";
    echo 
"&#38;#38;#1050;&#38;#38;#1086;&#38;#38;#1084;&#38;#38;#1084;&#38;#38;#1077;&#38;#38;#1085;&#38;#38;#1090;&#38;#38;#1072;&#38;#38;#1088;&#38;#38;#1080;&#38;#38;#1080;: $image_comments\n";
    echo 
"</td>";
}
echo 
"</tr></table>";
//end table
?>

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: русские сюда памагите""!!!
« Reply #5 on: December 26, 2007, 06:32:18 PM »
To Acidgod

Respect

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: русские сюда памагите""!!!
« Reply #6 on: December 26, 2007, 06:40:06 PM »
And why when I do(make)

Code: [Select]
ob_start();
include("../sait.ru/random_more_pics.php");
$script = ob_get_contents();
ob_end_clean();
$content .= $script;

It in slaed cms. the complete text of the block is those

Code: [Select]
<?php
if (!defined('BLOCK_FILE')) {
        
Header("Location: ../index.php");
        exit;
}
    
$content "<link rel=\"stylesheet\" href=\"http://prikolki.ru/templates/ald_vopus/style.css\" type=\"text/css\">";
    
$content "<p align=\"center\">";
ob_start();
include(
"../gallery.prikolki.ru/random_more_pics.php"); 
$script ob_get_contents();
ob_end_clean();
$content .= $script;
?>

He writes

Code: [Select]
Fatal error: Cannot redeclare class db in /home/removed.by.Nicky/data/www/removed.by.Nicky/includes/db_mysql.php on line 28
And writes it изза that that one more block but with a code there is used

Code: [Select]
<?php
if (!defined('BLOCK_FILE')) {
        
Header("Location: ../index.php");
        exit;
}
    
$content "<link rel=\"stylesheet\" href=\"http://prikolki.ru/templates/ald_vopus/style.css\" type=\"text/css\">";
    
$content "<p align=\"center\">";
ob_start();
include(
"../gallery.prikolki.ru/new_pics_center.php"); 
$script ob_get_contents();
ob_end_clean();
$content .= $script;
?>


How to clean(remove) this mistake?
« Last Edit: December 26, 2007, 08:37:00 PM by Nicky »

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: русские сюда памагите""!!!
« Reply #7 on: December 26, 2007, 08:51:48 PM »
delete:
Code: [Select]
$site_db = new Db($db_host, $db_user, $db_password, $db_name);

Offline dynkan-maclaud

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: русские сюда памагите""!!!
« Reply #8 on: December 26, 2007, 09:00:32 PM »
delete:
Code: [Select]
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
спасибо, (Thanks)

Offline Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: русские сюда памагите""!!!
« Reply #9 on: December 26, 2007, 09:14:04 PM »
he no Porn in your Signature Image, please.