Author Topic: Messages for Admin  (Read 7034 times)

0 Members and 1 Guest are viewing this topic.

Offline Lesik

  • Newbie
  • *
  • Posts: 38
    • View Profile
Messages for Admin
« on: November 04, 2005, 08:09:10 AM »
To excuse me for bad English language.
I bring to your attention updating which can more one is required if managers. Updating allows to leave brief messages for other managers in the administrative panel.

Keep all data and make a backup copy 4 images

Brought changes:
admin\home.php
lang\english\admin.php
new file messages.txt

1. Find in a file lang\english\admin.php
Code: [Select]
$lang ['headline_stats'] = " Statistika ";
Also insert after this line
Quote
$lang ['headline_mesag'] = " Messages for admin ";


2. In a file admin\home.php
Find:
Quote
---------------------------------------------------------------------
      $total_images + = $val ['num_images'];
   }
}
---------------------------------------------------------------------
Also insert after last} the following text:

Code: [Select]
// messages for admin's *********************************************************
  printf (" <span class = \ " headline \ "> % s </span> <br/> <br/> ", $lang ['headline_mesag']);

   show_table_header ($lang ['headline_mesag'], 4);

    echo " <table class = \ "".get_row_bg (). " \ " border=0 width=100 %> ";
    echo " <tr class = \ "".get_row_bg (). " \ "> \n ";
    echo " <td> \n ";
    $file=file ("messages.txt");
    while (list ($index, $val) = each ($file)) {
    echo " <font color = \ " * CC3300 \ " size = \ " 2 \ "> <b> ";
    echo (" $val <BR> ");
    echo " </b> </font> ";
    $num = $index;
}
    if (isset ($ _POST ['ok']) ** isset ($ _POST ['id'])) {
    $key = $ _POST ['id'];
    if (! is_numeric ($key)) exit ();
    $key-;
    $file [$key] = $ _POST ['ok.'] " \n ";
    if ($fp = fopen ("messages.txt", "w")) {
    fwrite ($fp, implode (" ", $file));
    fclose ($fp);
    echo " <html> <head> ";
    echo " <META HTTP-EQUIV ='Refresh ' CONTENT = ' 0; URL = ". $ _ SERVER ['PHP_SELF']. " '> ";
    echo " </head> </html> ";
}
}
    echo " <center> \n ";
    echo " <form action=home.php method=post>
    <input type ='text ' size=100 name=ok> <BR>
    <input type ='hidden ' name=id value = ". $ num. ">
    <input type ='submit ' value ='send messages'>
    <input TYPE ='button ' VALUE ='refresh ' ONCLICK ='ReloadButton () '>
     <script>
     function ReloadButton ()
     {
     location.href ='home.php ';
}
     </script>
     </form> ";
   echo " </center> \n ";
   echo " </td> \n ";
   echo " </tr> \n ";
   echo " </table> \n ";
   show_table_footer ();
// messages for admin's *********************************************************

Create a new file in a folder admin - message.txt
« Last Edit: January 12, 2007, 09:35:31 AM by Lesik »

skiemor

  • Guest
Re: Messages for Admin
« Reply #1 on: January 19, 2008, 05:25:17 PM »
;-(
Parse error: parse error, unexpected T_STRING in /homepages/...admin/home.php on line 183