$thepp .= ".jpg"; $thepp2 = ".jpg"; } elseif ($theimageinfo[2] == 3) { $thepp .= ".png"; $thepp2 = ".png"; } if ($error == "") { $myvideoimgnew = $config['pdir'] . "/" . $thepp; if (file_exists($myvideoimgnew)) { unlink($myvideoimgnew); } copy($uploadedimage, $myvideoimgnew); if ($processgif == "1") { do_resize_image2($myvideoimgnew, "700", "5000", true, $config['pdir'] . "/t/l-" . $thepp, $config['pdir'] . "/t/z-" . $thepp); do_resize_image2($myvideoimgnew, "500", "3000", true, $config['pdir'] . "/t/" . $thepp, $config['pdir'] . "/t/z-" . $thepp); do_resize_image2($myvideoimgnew, "220", "220", true, $config['pdir'] . "/t/s-" . $thepp, $config['pdir'] . "/t/z-" . $thepp); } else { //do_resize_image($myvideoimgnew, "700", "5000", true, $config['pdir']."/t/l-".$thepp); //do_resize_image($myvideoimgnew, "500", "3000", true, $config['pdir']."/t/".$thepp); //do_resize_image($myvideoimgnew, "220", "220", true, $config['pdir']."/t/s-".$thepp); do_resize_image($myvideoimgnew, "1600", "5000", true, $config['pdir'] . "/t/l-" . $thepp); do_resize_image($myvideoimgnew, "1200", "3000", true, $config['pdir'] . "/t/" . $thepp); do_resize_image($myvideoimgnew, "640", "640", true, $config['pdir'] . "/t/s-" . $thepp); } if (file_exists($config['pdir'] . "/" . $thepp)) { if ($config['wm'] == "1") { $watermark = $config['imagedir'] . "/" . $config['watermark']; if ($thepp2 == ".png") { $img = imagecreatefrompng($config['pdir'] . "/t/l-" . $thepp); } elseif ($thepp2 == ".jpg") { $img = imagecreatefromjpeg($config['pdir'] . "/t/l-" . $thepp);
do_resize_image($myvideoimgnew, "192", "4000", true, $config['pdir'] . "/t/s-" . $thepp); do_resize_image($myvideoimgnew, "75", "75", false, $config['pdir'] . "/t/t-" . $thepp); } $fbphotourl = $config['purl'] . "/t/" . $thepp; if (file_exists($config['pdir'] . "/" . $thepp)) { $pkey = md5($pid); $query = "UPDATE posts SET pic='{$thepp}', active='1', pkey='" . mysql_real_escape_string($pkey) . "' WHERE PID='" . mysql_real_escape_string($pid) . "'"; $conn->execute($query); if (file_exists($myvideoimgnew)) { unlink($myvideoimgnew); } $theimageinfo = getimagesize($uploadedimage); $ow = $theimageinfo[0]; if ($ow > 0) { if ($processgif == "1") { do_resize_image2($uploadedimage, $ow, "12000", true, $config['pdir'] . "/" . $thepp, $config['pdir'] . "/t/z-" . $thepp); if (file_exists($config['pdir'] . "/t/z-" . $thepp)) { unlink($config['pdir'] . "/t/z-" . $thepp); } } else { do_resize_image($uploadedimage, $ow, "12000", true, $config['pdir'] . "/" . $thepp); } } unlink($uploadedimage); $pinurl = $thebaseurl . "/pin/" . $pkey; $query = "SELECT bname FROM boards WHERE BID='" . mysql_real_escape_string($board_id) . "' limit 1"; $executequery = $conn->execute($query); $bname = $executequery->fields['bname']; $seobname = seo_bname($bname); $boardurl = $thebaseurl . "/" . stripslashes($_SESSION['USERNAME']) . "/" . $seobname; $arr = array('success' => true, 'msg' => 'success', 'm1' => $lang['169'] . ' <a href="' . $boardurl . '">' . $bname . '</a>', 'm2' => '<a href="' . $pinurl . '">' . $lang['93'] . '</a>');