Re: Admin-panel (MySQL)
i am uploading it and install but after login I realized that images not showing!
What is the reason?
You are not logged in. Please login or register.
i am uploading it and install but after login I realized that images not showing!
What is the reason?
hello to the entire community the problem I have is this is that I have installed the script with admin panel in a folder called img not show me photos in admin panel url is the problem as it could change the url img browse to the folder that is where I have installed everything, sorry for my English use a translator.
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehp
This admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.
I don't know if this helps any one, but it was fun to make ![]()
very basic import script. just adds the images to the db. nothing more. (doesn't get the image file size however, idk. if you want it ask)
the script:
<?php
// timer FTW
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
echo "<h1>Admin importer thing by Gamerlv</h1>";
echo "<h2>Warning, this script may run ALOT of mysql queries!</h2>";
echo "<p>So make sure you have engouht time to let it run.</p>";
echo "<p>This takes about 0.001527 seconds per image (that's what it takes on my pc)</p>";
echo "<form action=\"\">
<p><input type=\"hidden\" value=1 name=\"ihavethetime\" /></p>
<input type=\"submit\" value=\"I have the time\" />
</form>";
if (!isset($_GET['ihavethetime']) || !$_GET['ihavethetime'])
die(); //no need to go any futher.
require_once('config.php');
require_once('db_connect.php');
#This header only is for the function getImages
# Original PHP code by Chirp Internet: www.chirp.com.au
# Please acknowledge use of this code by including this header.
# 25% rewitten by Gamerlv
function getImages($dir)
{
$cachefile = "cache.import";
if (file_exists($cachefile)){
$cache = explode("|||" ,file_get_contents($cachefile));
if (time() - $cache[0] > 172800) {
return $cache;
}
unset($cache);
}
$imagetypes = array("image/jpeg", "image/gif", "image/png", "image/bmp");
# array to hold return value
$retval = array();
$return = array();
# add trailing slash if missing
if(substr($dir, -1) != "/") $dir .= "/";
# full server path to directory
$fulldir = getcwd()."/".$dir;
$d = @dir($fulldir) or die("getImages: Failed opening directory ".$dir." for reading <br />In ".getcwd() );
while(false !== ($entry = $d->read())) {
# skip hidden files
if($entry[0] == ".") continue;
if (!function_exists('mime_content_type'))
{
function mime_content_type($file)
{
//!!!!!THIS ONLY WORKS @ LINUX!!!!!!!
return trim(exec('file -bi ' . escapeshellarg($file)));
}
}
# check for image files
if(in_array(mime_content_type($fulldir.$entry), $imagetypes)) {
$retval[] = array(
'path' => "/".$dir.$entry,
'name' => $entry
);
}
}
$d->close();
$return[0] = time();
foreach($retval as $key => $value)
{
$five = substr($value['name'], 0 , 6);
if ( !($five == "thumb_") && !($five == "editor") ){
unset($five);
$return[] = $value['name'];
echo "I found ". $value['name'] ."<br />\n";
}
}
unset($retval);
if (file_exists($cachefile)){
$cache = implode("|||" ,$return);
file_put_contents($cachefile, $cache);
}
return $return;
}
//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"] or "127.0.0.1";
$views=0;
$picfsize=0;
$pic_width=0;
$pic_height=0;
$tamano = 0;
echo "<br /><p>Okay, here we go, I'm now starting to look for your images.</p><br />\n";
if (isset($config))
{
$images = getImages($config['dir']['images']);
} elseif (isset($_GET['folder']) && $_GET['sec'] == "Ag5Fw4afbhFP52" ) {
$images = getImages($_GET['folder']); //for testing
define("DIR_IM", $_GET['folder']."/");
} else {
$images = getImages(DIR_IM);
}
//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."
)");*/
echo "<h3>-=Got the images, lets import them=-</h3>\n";
$i = 0;
$c = 0;
$query = "insert IGNORE into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height) values";
foreach ($images as $key => $image)
{
if ($key == 0) continue;
echo "Generating sql on " . $image . "<br />\n";
$exten = substr($image, -3);
list($width, $height) = getimagesize(DIR_IM . $image);
$query .= " (
".$created.",
".$lastviewed.",
'".$exten."',
'".$submitip."',
".$tamano.",
'".$image."',
".$width.",
".$height."
)";
if ($i == 60){
echo "<h3>-=Running the query to not make it too long=-</h3>\n";
mysql_query($query); //excute, so it doesn't become to big
$i = 0;// rest count
//die("lets stop right here. <br />". $query); //debug
$query = "insert IGNORE into pics(created,lastviewed,pictype,submitip,picfsize,uniqid,pic_width,pic_height) values"; //start fresh
} else {
$query .= ",";
}
$i++; $c++; //add one to count
}
// yeay timing
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "<br />
<br />
<p>Okay, where all done.</p>
<p>In total I imported: ".$c." images and this took ".$totaltime." seconds.</p>
That's " . $totaltime / $c . " seconds per image <br /> ps, dont forget to delete me.";
?>
Please note, I did not test this with the panel. There for I need your help to test this.
Last edited by gamerlv (2010-08-09 12:45:54)
AndreasHW wrote:Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehpThis admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.
yes i understand but when i install this mod i have in db many images and i see in admin panel but without pictures, is easy to fix this someboby?
gamerlv wrote:AndreasHW wrote:Hi, i have install this nice software and i have in dir/images about 1100 images.
Then i install this mod( Admin-panel (MySQL)) and almost all are ok except i dont have images in admin panel as you see (i hope understand what i mean with poor english)
http://tinyurl.com/33byehpThis admin panel only works if you install it from the start. Since all images have to be in its db.
I have recently done some image work, I might be able to make a import script.yes i understand but when i install this mod i have in db many images and i see in admin panel but without pictures, is easy to fix this someboby?
ho lolz. wrote an import whiles you didn't need it. waist of time
.
I can probably fix it if I can look at the source code. Can you pm you url and login stuff ( I won't change anything)?
Thank you for all but i cant sent you the login stuff
I unistall this mod
wait! after i change to this mod, my remote upload tab doesn't work... what's the problem..?
Hi,
Revert back to the original scripts Index and CSS it should fix it
Hi all, I just installed this over the top of a pretty fresh install(I only had 1 image uploaded as a test) and am having some issue with running install.php. I created a new DB and added all the info into config.php but I continuously get Unable to connect to DB messages. I'm trying to figure out if I'm overlooking something simple here but I'm just not seeing it. I was wondering if someone could possibly point me into the right direction here? Thanks.
Works great, thanks! Only thing that needs to be adjusted is javascript as the original download files use different javascript files than this mod.
@chrishicks is it an add-on domain on shared hosting? If so your DB info will be like the folowing I believe:
If say database is 'images' and hosting account name is 'mywebsi' (Name you login with on cPanel) then your config info should say 'mywebsi_images' and not just 'images'. Same way for database and username. Not sure if that made sense or not.
Last edited by konink (2010-09-05 06:19:52)
Hi!
Could you be so kind as to help me, please. What shall I change in engine.php for SFTP?
New topic -> http://chevereto.com/foro/topic688-new- … ql-11.html
Powered by PunBB, supported by Informer Technologies, Inc.
Powered by PunBB