HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/root/home/awaldron/public_html/archive/ras/admin/gallery/photo_copy.php
<?php
include "../../f_db.php";
dbconnect();

$copyto = $_REQUEST['copyto'];
$pid = $_REQUEST['pid']; 

// GET MAX ORDER NUM OF GALLERY
$order = qsql("SELECT MAX(`order`) FROM ras_gallery_phogal WHERE gal_id=".$copyto);
if (!$order) $order = 1;
else $order++;

$ins = "INSERT INTO ras_gallery_phogal (gal_id, photo_id, `order`, cover) VALUES (".$copyto.", ".$pid.", ".$order.", 0)";
$insert = qupdate($ins);

if (!$insert) echo "ERROR: Could not copy, photo already exists in gallery.";


//echo $ins; 

// REORDER
//gallery_reorder($gal);

?>