Topic: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Hi!  smile
Updated my plugin admin panel for Chevereto [NB 1.91].
Now, to install it, you need to download only the admin folder and replace the index.php and engine.php.
Also added the ability to select the language.

Download

Old topic: http://chevereto.com/foro/topic464-admi … mysql.html
----------------------------------------------------------------------------------------------

Admin-panel for Chevereto [NB 1.91] (http://www.chevereto.com)
Version: 1.1 (11.13.2010)
 
Copyright (C) 2010 by SunLord
Web:  http://sunlord.ru
Email: lapenkoff@gmail.com
ICQ:   2643333
Skype: sunlord.ru

Installation:
   1. Upload to server in chevereto folder
   2. In /admin/config.php add DB info, and admin login and pass, select language
   3. Run yoursite.com/admin/install.php
   4. Delete /admin/install.php
   5. Go to yoursite.com/admin

Update:
   1. Delete old folder /admin
   2. Upload all without file admin/install.php to server in chevereto folder
   3. In /admin/config.php add DB info, and admin login and pass, select language

---------------------------------------------
---------------------------------------------

You can not replace engine.php and index.php.

Then add in engine.php:

           

// Config
            require('admin/config.php');
            require('admin/db_connect.php');

            //For admin-panel.
            $now=mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
            $uid=0;
            $created=$now;
            $lastviewed=0;
            $submitip=$_SERVER["REMOTE_ADDR"];
            $views=0;
            $picfsize=0;
            $pic_width=0;
            $pic_height=0;

And under the code

         

else { // Check local + remote 
        unset($modo);
        $modo = 1;
        $spit = true;
        $errormsg = CRITIC_ERROR_INPUT;
        $titulo = ERROR_UPLOADING.ESP_TITULO;
     }

add
           

//For admin-panel. Send info about img to DB.
           mysql_query("insert into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height)
           values(
           ".$created.",
           ".$lastviewed.",
           '".$exten."',
           '".$submitip."',
           ".$tamano.",
           '".$name."',
           ".$ancho.",
           ".$alto."
           )");

In index.php under the

      

$quehace = TXT_SEEING;

add
      

$namesun=$_GET['v'];
       $curtime=mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"));
           mysql_query("update pics set lastviewed=$curtime, views=views+1 where uniqid='$namesun'")
           or die(mysql_error());

Last edited by sunlord (2010-12-27 19:38:26)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Thanks sunlord, i'll get around to testing this.

Is there a feature where we can find images by searching an IP?

Last edited by piperts (2010-11-14 16:55:38)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Will need to do  smile

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

what change?

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Привет !
Спасибо за классный мод, очень и очень помогает ! Было бы очень удобно если бы ты сделал какой-то способ отметки картинки галочкой например, и чтобы потом массово удалять, например если порнуху льют чтобы сразу все картинки выделять и удалять.
Спасибо !

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Привет! smile
Да, нужно сделать, только времени всё нет.
Рад, что мод нравится smile

Last edited by sunlord (2010-11-15 15:14:38)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

What are the actual changes made in this update? And I am getting table "pics" already exists!

Thank u!  big_smile

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

fdls4all,
Main - mod based on NB 1.91 version
Added ability to select languages and to write language files
The maximum number of admin files placed in admin folder and does not require replacing estilo.css, config.php

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Here is the es.php (spanish). By the way, great mod smile...

<?
//Login
define('LOGIN', 'login');
define('PASSWORD', 'password');
define('DOLOGIN', 'LOGUEARSE');

//Index
define('ADMINISTRATION', 'Administracion');
define('MAIN', 'Principal');
define('BROWSE', 'Explorar');
define('ACTIONS', 'Acciones');
define('LOGOUT', 'Salir');

//Statistics
define('NUMBER_OF_IMAGES', 'Numero de imagenes en el sistema');
define('SIZE_OF_ALL_IMAGES', 'Espacio utilizado por las imagenes');
define('NEW_IMAGES_PER_DAY', 'Nuevas imagenes por dia');

//Actions
define('OPTIMIZE_TABLES', 'Optimizar tablas');
define('REPAIR_TABLES', 'Reparar tablas');
define('REMOVE_IMAGE_BY_FILENAME', 'Remover imagen por nombre');
define('REMOVE_IMAGE_THAT_DO_NOT_LOOK', 'Remover imagenes que no hayan sido vistas en ');
define('FIND_IMAGE_BY_FILENAME', 'Encontrar imagen por nombre');
define('DAYS', 'dias');
define('FILE_DELETED', 'La imagen fue borrado');
define('OPTIMIZED', 'Optimizado');
define('THE_REQUEST_MUST_BE', 'Lo requerido debe tener de 3 a 50 caracteres');
define('DELETE_INSTALL', 'Ahora elimina el install.php del servidor!');

//Browse
define('NEWS', 'nuevas');
define('LAST_VIEWS', 'ultimas vistas');
define('TOP', 'top');
define('ANTI_TOP', 'anti-top');
define('LIGHT', 'livianas');
define('HEAVY', 'pesadas');
define('PAGES', 'Paginas');
define('NO_IMAGES', 'No hay imagenes');
define('UPLOAD_DATE', 'fecha de subida');
define('LAST_VIEW', 'ultima vista');
define('VIEWS', 'vistas');
?>

Last edited by aneaxs (2010-12-01 06:51:59)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

i install the 1.91, and admin mod and gallery mod
i have a problem with admin, i take a message in Main

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/xxxx/admin/includes/_stat.php  on line 11

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/xxxx/admin/includes/_stat.php on line 21

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/xxxx/admin/includes/_stat.php on line 5

and the Browse

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/xxxx/admin/includes/browse.php  on line 36

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxx/public_html/xxxx/admin/includes/browse.php on line 61

PLS delete the post...i forgot to install it. its ok now

Last edited by AndreasHW (2010-12-04 05:35:29)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

is there anyway to make the admin panel reconize images that where uploaded before it was installed?

And also the total size of images in the _stats.php files is not displaying correctly its showing numbers followed by diamonds with questionmarks in them? any way i can fix that?

Last edited by th3fallen (2010-12-07 01:17:50)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

also would you be intrested in a database based user authenication vs your very unsecure unencrypted method?

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

i was looking at writing my own admin panel but have decided to work further on this one as long as the author is ok with that. so far ive added functionality for user/pass into the mysql db, with user levels so you could have more than one person as an admin with different access levels(for future things in the admin area) passes will be md5 hashed. ive also added functionality so that the script retains version info so that future versions can be "updated" rather than clean installing all the time, and you also have the option to do a complete fresh database install. i also changed the config so it has its own so you dont have to mod your main config. im also working on a script to add all images to the databse which are existing when you install the script.

Last edited by Bonkaz (2010-12-12 22:14:19)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

beta up and running, basically ive re-writeen the installer to support updates to the admin panel, fresh installs, sql based user/passes with user level support for future features. It also now features version reporting for updating, full error checking and reporting. im still to work out adding exsisting images to the database but im sure i can work out somthing. but they wont have all the data that the new images have. i.e no ip reporting and so on, also to be added for updating in the future you will need to be a top level admin and login before the update can be processed for beter security and also disabling the admin login until the install.php is deleted or renamed, but it would be very insecure to keep it on your server.

i will release this version as long as the author doesnt mind. dont want to tread on toes.

cheers.

have a play with it here.

www.gigabitgaming.com/snapshot/install.php

Last edited by Bonkaz (2010-12-14 09:00:27)

Thumbs up

Re: Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

Good work! Come on, upload it, everybody will test smile

Thumbs up