? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/
File Upload :
Current File : /home/admin/public_html/old/updatecode.php

<?php
$host="localhost:8889";
$user="root";
$pw="root";
$dbname="happytokorea";
$connect=mysql_connect($host,$user,$pw);
mysql_select_db($dbname,$connect)or die("can not connect database");
mysql_query("set NAMES utf8");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>File update sql by php</title>
</head>

<body>

 <?
 
 
                    $sql = "SELECT * FROM `jos_content` WHERE `catid`=20 or `catid`=21 and `images`='' order by `id` desc";
                    $result = mysql_query($sql);
                    while($row= mysql_fetch_array($result))
                    { 
						$id=$row["id"];
                        $images  = $row["images"];
						$introtext  = $row["introtext"];
						preg_match('/<img.+src=[\'"](?P<src>.+?)[\'"].*>/i',$introtext, $i);
						echo $id."<br>";
						if(!stristr($i[src],"http://www.happytokorea.com/"))											
						$i[src]="http://www.happytokorea.com/".$i[src];
						$i[src]=str_replace("/", "\/",$i[src]);
						
						$change="{\"image_intro\":\"".$i[src]."\",\"float_intro\":\"\",\"image_intro_alt\":\"\",\"image_intro_caption\":\"\",\"image_fulltext\":\"\",\"float_fulltext\":\"\",\"image_fulltext_alt\":\"\",\"image_fulltext_caption\":\"\"}";
						echo $change."<br>";
				
                    }
						
                ?>
                
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$