summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/Functions.php38
-rw-r--r--application/configs/application.ini.dist1
-rw-r--r--application/views/scripts/person/index.phtml2
-rwxr-xr-xinstall.sh2
4 files changed, 22 insertions, 21 deletions
diff --git a/application/Functions.php b/application/Functions.php
index ad2b147..0b89390 100644
--- a/application/Functions.php
+++ b/application/Functions.php
@@ -42,23 +42,23 @@ function print_a(){
}
function PostToHost($host, $path, $referer, $userAgent, $dataToSend) {
- $fp = @ fsockopen($host, 80);
- @ fputs($fp, "POST $path HTTP/1.1\r\n");
- @ fputs($fp, "Host: $host\r\n");
- @ fputs($fp, "User-Agent: $userAgent\r\n");
- @ fputs($fp, "Referer: $referer\r\n");
- @ fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
- @ fputs($fp, "Content-length: ". strlen($dataToSend) ."\r\n");
- @ fputs($fp, "Connection: close\r\n\r\n");
- @ fputs($fp, $dataToSend);
- $res = "";
- while(!@ feof($fp)) {
- $res .= utf8_encode(fgets($fp, 128));
- }
- @ fclose($fp);
-
- $res = @ explode("\r\n\r\n",$res);
- $result['http-header'] = $res[0];
- $result['http-body'] = $res[1];
- return $result;
+ $fp = @ fsockopen($host, 80);
+ @ fputs($fp, "POST $path HTTP/1.1\r\n");
+ @ fputs($fp, "Host: $host\r\n");
+ @ fputs($fp, "User-Agent: $userAgent\r\n");
+ @ fputs($fp, "Referer: $referer\r\n");
+ @ fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
+ @ fputs($fp, "Content-length: ". strlen($dataToSend) ."\r\n");
+ @ fputs($fp, "Connection: close\r\n\r\n");
+ @ fputs($fp, $dataToSend);
+ $res = "";
+ while(!@ feof($fp)) {
+ $res .= @ fgets($fp, 128);
+ }
+ @ fclose($fp);
+
+ $res = @ explode("\r\n\r\n",$res);
+ $result['http-header'] = $res[0];
+ $result['http-body'] = $res[1];
+ return $result;
} \ No newline at end of file
diff --git a/application/configs/application.ini.dist b/application/configs/application.ini.dist
index 971d1f7..5ae8d66 100644
--- a/application/configs/application.ini.dist
+++ b/application/configs/application.ini.dist
@@ -13,6 +13,7 @@ resources.db.params.username =
resources.db.params.password =
resources.db.params.dbname =
resources.db.isDefaultTableAdapter = true
+resources.db.params.driver_options.1002 = "SET NAMES UTF8;"
resources.view[] = ""
resources.modules = ""
pbs2.host =
diff --git a/application/views/scripts/person/index.phtml b/application/views/scripts/person/index.phtml
index e90ab79..facacac 100644
--- a/application/views/scripts/person/index.phtml
+++ b/application/views/scripts/person/index.phtml
@@ -5,7 +5,7 @@ label {
}
</style>
<?php echo $this->formButton('editperson', 'Edit', array(
- 'onclick' => 'self.location="' . $this->pbs2host . '/user/person/edit/"',
+ 'onclick' => 'window.open("http://' . $this->pbs2host . '/user/person/edit/");return false;',
'class' => 'rightbutton'))?>
<div class='listelement'>
<div class='element'>
diff --git a/install.sh b/install.sh
index 29662b5..d31aa06 100755
--- a/install.sh
+++ b/install.sh
@@ -66,7 +66,7 @@ sed -e "14s/\$/$db_name/" -i $targetDir/application/configs/application.ini
echo -n "Please enter host of pbs2: "
read pbs2_host
-sed -e "18s/\$/$pbs2_host/" -i $targetDir/application/configs/application.ini
+sed -e "19s/\$/$pbs2_host/" -i $targetDir/application/configs/application.ini
echo "Create database and tables"
cat $targetDir/setup/poolctrl.sql | sed -e "s,##poolctrl##,$db_name," > /tmp/poolctrl.sql