4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2018, 07:05:39 AM

Login with username, password and session length
Search:     Advanced search
Follow 4images on twitter: Click here to follow!
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Issues / Ausgaben
| |-+  Discussion & Troubleshooting (Moderators: Acidgod, ivan, Rembrandt)
| | |-+  Suchergebnissausgabe
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 [2] 3 4 » »» Print
Author Topic: Suchergebnissausgabe  (Read 35764 times)
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #15 on: January 31, 2011, 04:00:15 PM »

bist du schon damit weitergekommen?
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #16 on: January 31, 2011, 09:32:29 PM »

hallo,

kein stück weiter,  versuch mich da einzulesen,  http://php.net/manual/de/function.date.php

aber komme leider nicht vorwärts...... Crying or Very sad Crying or Very sad Crying or Very sad


vieleicht könnte man den Birthday Mod umbauen http://www.4homepages.de/forum/index.php?topic=11558.0



gruß





Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #17 on: February 01, 2011, 10:33:39 PM »

hat ein bischen länger gedauert, hatte ein neues projekt.....

so die php vorlage habe ich von hier genommen:
http://www.4homepages.de/forum/index.php?topic=28819.msg154776#msg154776

die SQL abfrage aus der search.php und ein wenig abgeändert.

die statistic.php in den root kopieren:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
//,date_format( str_to_date( i.image_datum, '%m.%d.%Y' ) , '%m.%d.%Y' ) AS my_date
  
$sql "SELECT i.image_gestorben, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 AND i.image_gestorben != ''
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorben, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
$liste "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

   
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorben']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "heute vor ".$jahr." jahren am ".$image_row['image_gestorben']." ist ".$image_row['image_name']." gestorben";
    }
    
//print_r($ausgabe);
    
    
if(!empty($ausgabe)){
    
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
      
      
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
    
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
   
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
    
    
$liste .= "</tr>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
     
$liste .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

 
}
     
$liste .= "</table>\n";
    
  
$content $liste;
  unset(
$liste);
 
// end if

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

ich habe dir zu der datums geschichte jeweils einen hinweistext dazu geschrieben lies dir das durch, dann wird einiges klarer.

die statistic.html in deinen template ordner:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{header}
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablehead">
        <tr>
          <td width="100%" colspan="4"><table cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td width="6"><img src="{template_url}/images/header_top_left.gif" width="6" height="6" alt="" ></td>
        <td width="100%"><img src="{template_url}/images/header_top.gif" width="100%" height="6" alt="" ></td>
<td width="6"><img src="{template_url}/images/header_top_right.gif" width="6" height="6" alt="" ></td>
    </tr>
</table>
</td>
        </tr>
        <tr>
          <td width="6"><img src="{template_url}/images/header_left.gif" width="6" height="60" alt="" ></td>
          <td width="100%"><img src="{template_url}/images/header_logo.gif" width="405" height="60" alt="" ></td>
          <td width="225" align="right">
            <form method="post" action="{url_search}">
              <table border="0" cellspacing="0" cellpadding="1">
                <tr>
                  <td>
                    <input type="text" name="search_keywords" size="15" class="searchinput" >
                  </td>
                  <td>
                    <input type="submit" value="{lang_search}" class="button" name="submit" >
                  </td>
                </tr>
                <tr valign="top">
                  <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td>
                </tr>
              </table>
            </form>
          </td>
          <td align="right" width="6"><img src="{template_url}/images/header_right.gif" width="6" height="60" alt="" ></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
            <table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr>
                <td class="navbar" height="23">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" >{clickstream}</td>
                      <td align="right">
<a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
<a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;
 </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" valign="top" class="row2">
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" >{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box} </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
                    </tr>
                  </table>
                  {if random_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" >{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
                      <br >
                        {random_image}
                        <br >
                        <br >
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" ></td>
                    </tr>
                  </table>
                  {endif random_image}
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" ></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" ></td>
                <td width="100%" valign="top"><br >
                  <b class="title">{lang_statistic_page_title}
                  </b>
                  <hr size="1" >
{content}
</br></br>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>{category_dropdown_form}</td>
                      <td align="right">{setperpage_dropdown_form}</td>
                    </tr>
                  </table>
                  <p>&nbsp;</p>
                </td>
                <td width="20" valign="top"><img src="{template_url}/images/spacer.gif" width="19" height="19" alt="" ></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablebottom">
        <tr>
          <td width="6" nowrap><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" ></td>
          <td width="100%"></td>
          <td width="6" nowrap><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" ></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
{footer}

in die lang/main:
1
$lang['statistic_page_title'] = "Statistic";

suche in der  includes/ page_header.php:
1
"lang_registered_user" => $lang['registered_user'],
füge darunter ein:
1
"lang_statistic_page_title" => $lang['statistic_page_title'],

in der home.html suche:
1
<a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
füge darüber ein:
1
<a href="statistic.php"><b>{lang_statistic_page_title}</b></a>&nbsp;

so ich hoffe ich habe alles...

mfg Andi
« Last Edit: February 02, 2011, 10:50:35 PM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #18 on: February 02, 2011, 05:34:33 AM »

 Hallo

wow mir fehlen die worte. Ist alles sehr verständlich und nachvollziehbar


aber bei der der ausgabe ist was faul,


habe die statistic.php angepasst.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
  
$sql "SELECT i.image_gestorbenGP, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 AND i.image_gestorbenGP = '
$datum_heute'
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
$liste "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

   
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorbenGP']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "heute vor ".$jahr." jahren am ".$image_row['image_gestorbenGP']." ist ".$image_row['image_name']." gestorben";
    }
    
//print_r($ausgabe);
    
    
if ($count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
      
      
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
   
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$liste .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$i 0$i $leftover$i++) {
        
$liste .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$liste .= "</tr>\n";
    }
  }
  
$liste .= "</table>\n";
  
$content $liste;
  unset(
$liste);
 
// end if

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

1
$sql "SELECT i.image_gestorben, i.image_id,

in geändert
1
$sql "SELECT i.image_gestorbenGP, i.image_id,





dann kamm  ein fehler

1
2
DB ErrorBad SQL QuerySELECT i.image_gestorbenGPi.image_idi.cat_idi.user_idi.image_namei.image_descriptioni.image_keywordsi.image_datei.image_activei.image_media_filei.image_thumb_filei.image_download_urli.image_allow_commentsi.image_commentsi.image_downloadsi.image_votesi.image_ratingi.image_hitsi.image_gmap_latitudei.image_gmap_longitudei.image_gmap_zoomi.image_gmap_typei.image_gmap_showi.image_dienstgradi.image_gefallenami.image_gefallenini.image_begrabeni.image_geboreni.image_gestorbenGPi.image_geborenini.image_lagei.image_truppenteili.image_strasseni.image_group_imagei.image_groupi.image_Makei.image_Modeli.image_DateTimeOriginali.image_ISOSpeedRatingsi.image_ExposureTimei.image_FNumberi.image_FocalLengthi.image_ExposureBiasValuei.image_ApertureValuei.image_MaxApertureValuei.image_MeteringModei.image_Flashi.image_ExposureProgrami.image_ExposureModei.image_WhiteBalancei.image_GPSLatitudei.image_GPSLatitudeRefi.image_GPSLongitudei.image_GPSLongitudeRefi.image_GPSAltitudei.image_GPSTracki.image_pin_allowi.image_gebautc.cat_nameu.user_name FROM (friedhof_images ifriedhof_categories cLEFT JOIN 4images_users u ON (u.user_id i.user_idWHERE i.image_active AND i.image_datum '02.02.2011' AND c.cat_id i.cat_id ORDER BY STR_TO_DATE(image_datum'%d.%m.%Y'DESC
Unknown column 
'i.image_datum' in 'where clause'

habe dann

1
2
3
4
WHERE i.image_active AND i.image_datum '$datum_heute'
          
$sql_where_query
          
AND c.cat_id i.cat_id $cat_id_sql
          ORDER BY  STR_TO_DATE
(image_datum'%d.%m.%Y'DESC

in

1
2
3
4
 WHERE i.image_active AND i.image_gestorbenGP '$datum_heute'
          
$sql_where_query
          
AND c.cat_id i.cat_id $cat_id_sql
          ORDER BY  STR_TO_DATE
(image_gestorbenGP'%d.%m.%Y'DESC

bzw. image_date geändert

aber es wird nicht ausgegeben  , noch nicht mal ein fehler

http://www.grosspeterwitz.org/friedhof/4images/statistic.php

gruß
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #19 on: February 02, 2011, 05:42:31 AM »

diese fehler meldung kann ja nicht von deiner static.php kommen dieses feld "image_datum" hast du ja überall rausgelöscht, aber in der fehlermeldung taucht es auf?
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #20 on: February 02, 2011, 09:59:13 PM »

ich habe jetzt alles noch mal eingebaut,  

das image_datum  habe ich ersetzt durch image_gestorbenGP,  da sonst der fehler wie oben beschrieben aufpopt.


es wird aber nichts ausgegeben.
http://www.grosspeterwitz.org/friedhof/4images/statistic.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
  
$sql "SELECT i.image_gestorbenGP, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 AND i.image_gestorbenGP = '
$datum_heute'
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
$liste "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

   
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorbenGP']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "heute vor ".$jahr." jahren am ".$image_row['image_gestorbenGP']." ist ".$image_row['image_name']." gestorben";
    }
    
//print_r($ausgabe);
    
    
if ($count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
      
      
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
   
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$liste .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$i 0$i $leftover$i++) {
        
$liste .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$liste .= "</tr>\n";
    }
  }
  
$liste .= "</table>\n";
  
$content $liste;
  unset(
$liste);
 
// end if

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #21 on: February 02, 2011, 10:03:45 PM »

wenn heute kein sterbetag von jemanden ist wird nichts ausgegeben.
edit: sehe gerade ich habe eine fehler drinnen.....*sh***

in der statistic.php suche:
1
 AND i.image_gestorben '$datum_heute'
lösche das, ist ein kompletter schwachsinn von mir gewesen...   Mr. Green


edit: habe die statistic.php erneuert.....
« Last Edit: February 02, 2011, 10:39:21 PM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #22 on: February 02, 2011, 10:35:52 PM »

hi Rolling Eyes

jetzt wird was auf dem server abgefragt,  und als zeile mit leerausgabe angezeigt

http://www.grosspeterwitz.org/friedhof/4images/statistic.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
  
$sql "SELECT i.image_gestorbenGP, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
$liste "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

   
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorbenGP']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "heute vor ".$jahr." jahren am ".$image_row['image_gestorbenGP']." ist ".$image_row['image_name']." gestorben";
    }
    
//print_r($ausgabe);
    
    
if ($count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
      
      
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
   
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$liste .= "</tr>\n";
      
$count 0;
    }
  } 
// end while
  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$i 0$i $leftover$i++) {
        
$liste .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$liste .= "</tr>\n";
    }
  }
  
$liste .= "</table>\n";
  
$content $liste;
  unset(
$liste);
 
// end if

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #23 on: February 02, 2011, 10:41:33 PM »

ich habe die statistic.php erneuert, das mit den leerzeilen ist mir auch aufgefallen.
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #24 on: February 03, 2011, 06:08:17 AM »

Klasse funktioniert PERFEKT Wink

da bekomme ich wieder lust die restlichen Sterbedaten zu den Bildern einzutippen (stapelarbeit)


bin schon am erwitern auf das feld image_geboren. Dank deiner SUUUUPER beschreibung verstehe ich die arbeitsweise, nur an der abfrage aus SQL hänge ich fest.

http://www.grosspeterwitz.org/friedhof/4images/statistic.php

1
2
3
4
5
6
7
$sql "SELECT i.image_gestorbenGP, image_geboren, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 AND i.image_gestorben != ''
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC


wie bekomme ich das feld image_geboren  in die folgende zeile eingebaut?

1
   WHERE i.image_active AND i.image_gestorben != ''


1
   WHERE i.image_active AND i.image_gestorbenGPimage_geboren != ''
     geht nicht

1
   WHERE i.image_active AND i.image_gestorbenGP OR image_gestorben != ''
  geht nicht


gruß
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #25 on: February 03, 2011, 06:11:17 AM »

1
   WHERE i.image_active AND i.image_gestorben != ''  AND image_geboren != '' 

hoffe ich...  Very Happy
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #26 on: February 03, 2011, 01:54:47 PM »

nicht ganz Sad

1
WHERE i.image_active AND i.image_gestorbenGP != ''  AND image_geboren != '' 
funktioniert nicht.



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
//,date_format( str_to_date( i.image_datum, '%m.%d.%Y' ) , '%m.%d.%Y' ) AS my_date
  
$sql "SELECT i.image_gestorbenGP, i.image_geboren, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
      WHERE i.image_active = 1 AND i.image_gestorbenGP != ''  AND image_geboren != ''
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
$liste "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

   
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorbenGP']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "heute vor ".$jahr." jahren am ".$image_row['image_gestorbenGP']." ist ".$image_row['image_name']." gestorben";
    }
    
//print_r($ausgabe);
	

	

	

	
$ausgabe1="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_geboren']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe1 =  "heute vor ".$jahr." jahren wurde  ".$image_row['image_geboren']."  ".$image_row['image_name']." geboren";
    }
    
//print_r($ausgabe);
	

	

    
    if(!empty(
$ausgabe)){
    
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
      
      
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
    
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
	
 
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe1."</a></td>\n";
   
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
    
    
$liste .= "</tr>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
     
$liste .= "</tr>\n";
      
$count 0;
    }
  } 
// end while

 
}
     
$liste .= "</table>\n";
    
  
$content $liste;
  unset(
$liste);
 
// end if

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

http://www.grosspeterwitz.org/friedhof/4images/statistic.php






Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #27 on: February 03, 2011, 08:48:46 PM »

funktioniert schon, nur mußt du auch den php teil richtig schreiben. Smile

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?php
 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: statistic.php                                           *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.9                                                *
 *     File Version: 1.0.0 (by Rembrandt www.vienna-pictures.com)         *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 'statistic'// <-- Your Template Title

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
include(
ROOT_PATH.'includes/page_header.php');
$txt_clickstream $lang['statistic_page_title']; // <-- Clickstream Name

//################## EXAMPLE CUSTOM PHP CODE STARTS HERE ############################
 
$imgtable_width ceil((intval($config['image_table_width'])) / $config['image_cells']);
  if ((
substr($config['image_table_width'], -1)) == "%") {
    
$imgtable_width .= "%";
  }

  
$additional_sql "";
  if (!empty(
$additional_image_fields)) {
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_sql .= ", i.".$key;
    }
  }
  
  
$datum_heute date("d.m.Y");
//,date_format( str_to_date( i.image_datum, '%m.%d.%Y' ) , '%m.%d.%Y' ) AS my_date
  
$sql "SELECT i.image_gestorbenGP, i.image_geboren, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
          FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
          WHERE i.image_active = 1 AND i.image_gestorbenGP != '' AND i.image_geboren != '' 
          
$sql_where_query
          AND c.cat_id = i.cat_id 
$cat_id_sql
          ORDER BY  STR_TO_DATE(image_gestorbenGP, '%d.%m.%Y') DESC
         "
;
  
$result $site_db->query($sql);
  
  
  
$liste "<table style=\"text-align:center;\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  
$liste .= "<tr><td style=\"font-size:18px;font-weight:bold;text-decoration:underline;\">Gestorben</td></tr>";
  
$liste .= "</table>";
  
  
$liste .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  
$config['image_cells'] = 1;
  while (
$image_row $site_db->fetch_array($result)) {

    
$ausgabe="";
    
//array "$datum_gestorben" erstellen
    
$datum_gestorben explode(".",$image_row['image_gestorbenGP']);
    
//$datum_gestorben[0] =tag; $datum_gestorben[1] =monat;  $datum_gestorben[2] =Jahr

    //jetzt wird der tag und das monat zusammen gesetzt
    
$gestorben $datum_gestorben[0].$datum_gestorben[1];
    
//bspl. 04.03.1945 aus der DB ergibt: "0403"
 
    //jetzt brauchen wir noch das aktuelle datum (mittels date()), mit dem wir genauso verfahren.
    
$datum_heute explode("."date("d.m.Y"));
    
// tag und das monat wieder zusammen setzen
    
$heute $datum_heute[0].$datum_heute[1]; // ergibt zurzeit :)  0102
    
    //mit der jahreszahl verfahren wir genauso:
    
$jahr = ($datum_heute[2]) - ($datum_gestorben[2]);

    
//jetzt vergleichen wir die zahl "$gestorben" und die zahl "$heute"
    //sind die beiden zahlen gleich dann geben wir eine meldung aus.
    
if($gestorben == $heute ){
    
$ausgabe =  "Heute vor ".$jahr." Jahren am ".$image_row['image_gestorbenGP']." ist <b>".$image_row['image_name']."</b> Gestorben";
    }
    
//print_r($ausgabe);
  
    
if(!empty($ausgabe)){
      if (
$count == 0) {
        
$row_bg_number = ($bgcounter++ % == 0) ? 2;
        
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
      }
      
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe."</a></td>\n";
      
//$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\">".$image_row['image_datumr']."</td>\n";
      
      
$liste .= "</tr>\n";
      
$count++;
      if (
$count == $config['image_cells']) {
       
$liste .= "</tr>\n";
        
$count 0;
      }
    } 
  }
// end while
  
$liste .= "</table>\n";
//----------------------------------------------------------------------     
    

  
$result $site_db->query($sql); 

  
$liste .= "<table style=\"margin-top:20px;text-align:center;\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  
$liste .= "<tr><td style=\"font-size:18px;font-weight:bold;text-decoration:underline;\">Geboren</td></tr>";
  
$liste .= "</table>";
    
  
$liste .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";

  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)) { 
    
$ausgabe1="";
    
$datum_geboren explode(".",$image_row['image_geboren']);
    
$geboren $datum_geboren[0].$datum_geboren[1];
    
$datum_heute explode("."date("d.m.Y"));
    
$heute $datum_heute[0].$datum_heute[1];
    
$jahr = ($datum_heute[2]) - ($datum_geboren[2]);

    if(
$geboren == $heute ){
      
$ausgabe1 =  "Heute vor ".$jahr." Jahren am ".$image_row['image_geboren']." wurde <b>".$image_row['image_name']."</b> Geboren";
    }
    
//print_r($ausgabe);
    
if(!empty($ausgabe1)){
      if (
$count == 0) {
        
$row_bg_number = ($bgcounter++ % == 0) ? 2;
        
$liste .= "<tr class=\"imagerow".$row_bg_number."\">\n";
      }
      
      
$liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"><a href=\"./details.php?image_id=$image_row[image_id]\">".$ausgabe1."</a></td>\n";
      
// $liste .= "<td width=\"".$imgtable_width."\" valign=\"top\"></td>\n";
      
$liste .= "</tr>\n";
      
$count++;
      if (
$count == $config['image_cells']) {
        
$liste .= "</tr>\n";
        
$count 0;
      }
    }  
  }
// end while
  
$liste .= "</table>\n";
 
  
$content $liste;
  unset(
$liste);

//Here starts the lang register   
$site_template->register_vars(array( 
  
"content" => $content,                                   // <-- It is important that the same name used as in PHP Code above (in this example "my_php")
  
"lang_statistic_page_title" => $lang['statistic_page_title']  // <-- Page Title
                  // <-- the "example_text" must still be registered in the "lang/your language/main.php"
));

//################## EXAMPLE CUSTOM PHP CODE END HERE ################################

//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"

//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>

mfg Andi
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
kubiczek
Full Member
***
Offline Offline

Posts: 211

Thank You
-Given: 35
-Receive: 10


View Profile WWW
« Reply #28 on: February 03, 2011, 09:45:32 PM »

geschaft

es funzt........ nur

wenn ich

1
WHERE i.image_active AND i.image_gestorbenGP != '' AND i.image_geboren != '' 

in

1
WHERE i.image_active 1  

ändere.
habe es durch zufall festgestellt.

meine php kenntnisse sind dürftig.

Ohne solche HILFSBEREITEN USER wie Dich währen viele sachen für mich nicht durchführbar.

Ich habe echt viele Ideen, aber sehr oft scheitere ich an mangelden Programmierkenntnissen. 


vielen Dank nochmal
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 896

Vienna


View Profile WWW
« Reply #29 on: February 03, 2011, 10:19:42 PM »

past schon hauptsache es funktioniert jetzt, könntest du das bitte bei dir nochmal ausprobieren?
1
WHERE i.image_active AND (image_gestorbenGP <> '' OR image_geboren <> ''
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Pages: «« « 1 [2] 3 4 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.214 seconds with 20 queries.