• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Admin-panel (MySQL) 1.1 + 1.2 from Bonkaz

sunlord

Chevereto Member
Hi! :)
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-adminpanel-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:

Code:
// 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

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

add
Code:
//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

Code:
$quehace = TXT_SEEING;

add
Code:
$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());
 
Thanks sunlord, i'll get around to testing this.

Is there a feature where we can find images by searching an IP?
 
Привет !
Спасибо за классный мод, очень и очень помогает ! Было бы очень удобно если бы ты сделал какой-то способ отметки картинки галочкой например, и чтобы потом массово удалять, например если порнуху льют чтобы сразу все картинки выделять и удалять.
Спасибо !
 
Привет! =)
Да, нужно сделать, только времени всё нет.
Рад, что мод нравится =)
 
What are the actual changes made in this update? And I am getting table "pics" already exists!

Thank u! :D
 
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
 
Here is the es.php (spanish). By the way, great mod :)...

Code:
<?
//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');
?>
 
i install the 1.91, and admin mod and gallery mod
i have a problem with admin, i take a message in Main
Code:
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
Code:
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
 
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?
 
also would you be intrested in a database based user authenication vs your very unsecure unencrypted method?
 
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.
 
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
 
awsome will do, ill just do some tidying. i added a couple of small functions to it, one to render pages easier so all the data is collected and the prineted to the page, and ive added a warning to the admin login page if the install file still exists in either the the main directory or the admin folder.

you can update from your previous version to the version i have edited without changing to much.

im just wondering now if it was worth moving the database config to it own file, or whether i should have left it. the only reason i moved it was some ppl, like myself have modded original configs and its a pain having to change, although it would only be once because the rest of the code would be elsewhere.

btw, your current version and the things you have in the admin area so far is awsome, which is why i wanted to help move it further.

if you are still developing it, maybe i could work on it with you and i could host if needed a night SVN so we can see where each other is at.

cheers.
 
oh well, its good enough for a release.

ill post here for now, and ill make a new thread after.

v1.2 changelog
- new sql based login system
- better error reporting
- more secure
- fixed thumbs in admin area
- added verison checking and database is now updatable instead of losing data
- admin levels for future functions

get it here: LINK
 
Bonkaz said:
oh well, its good enough for a release.

ill post here for now, and ill make a new thread after.

v1.2 changelog
- new sql based login system
- better error reporting
- more secure
- fixed thumbs in admin area
- added verison checking and database is now updatable instead of losing data
- admin levels for future functions

get it here: LINK
That's cool, thanks a lot !
I think one more function will be very very useful - delete images by IP address , for sites which does not support 18+ images for example but still there are IP's uploading such. Now we need to delete them manually, that's kinda hard... This function will help a lot really ! Thanks !
 
Back
Top