summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/main.php b/main.php
index 263f0b5..b04d73c 100644
--- a/main.php
+++ b/main.php
@@ -54,7 +54,7 @@ Errors:
class gimsisextClient {
private $username;
private $password;
- public $version = array(0, 9, 0);
+ public $version = array(0, 9, 1);
private $programname = "gimsisextclient";
private $programdomain = 'gimsisextclient.gimb.tk';
private $cookiedir; // set at runtime, ker je get_curerent_user, v login()
@@ -504,14 +504,11 @@ Errors:
curl_setopt($ch, CURLOPT_URL, $this->gimsisextmodsporocilo."?params=IdMsg%3D".explode("|", $id)[0]);
curl_setopt($ch, CURLOPT_POST, 0);
$sporocilo_output = curl_exec($ch);
- file_put_contents("/tmp/as.txt", $sporocilo_output);
- $xmlDoc = new DOMDocument();
- $xmlDoc->loadHTML( $sporocilo_output );
- $textarea = DOMinnerHTML($xmlDoc->getElementById( "ctl00_ModalMasterBody_edtBesediloExt" ));
+ file_put_contents("/tmp/as2.txt", $sporocilo_output);
$zadeva = html_entity_decode(get_string_between($sporocilo_output, '<input name="ctl00$ModalMasterBody$edtZadeva" type="text" value="', '" id="ctl00_ModalMasterBody_edtZadeva" />'));
- $telo = html_entity_decode(html_entity_decode(get_string_between($textarea, "&lt;/span&gt;&lt;/p&gt;&lt;p&gt;", "&lt;/p&gt;\n")));
- $posiljatelj = html_entity_decode(html_entity_decode(get_string_between($textarea, "&gt;&lt;b&gt;Od&lt;/b&gt;: ", "&lt;br /&gt;&lt;b&gt;Poslano&lt;/b&gt;: "))); // ne trudi se za prejemnika, gimsisglitch(C)12
- $datumincas = get_string_between($textarea, "&lt;br /&gt;&lt;b&gt;Poslano&lt;/b&gt;: ", "&lt;br /&gt;&lt;b&gt;Za&lt;/b&gt;: "); // pazi, tale je za ljudi
+ $telo = html_entity_decode(html_entity_decode(get_string_between($sporocilo_output, "&lt;/span&gt;&lt;/p&gt;", "</textarea>")));
+ $posiljatelj = html_entity_decode(html_entity_decode(get_string_between($sporocilo_output, "&gt;&lt;b&gt;Od&lt;/b&gt;: ", "&lt;br /&gt;&lt;b&gt;Poslano&lt;/b&gt;: "))); // ne trudi se za prejemnika, gimsisglitch(C)12
+ $datumincas = get_string_between($sporocilo_output, "&lt;br /&gt;&lt;b&gt;Poslano&lt;/b&gt;: ", "&lt;br /&gt;&lt;b&gt;Za&lt;/b&gt;: "); // pazi, tale je za ljudi
$cas = explode(":", end(explode(" ", $datumincas)));
$datum['dan'] = intval(substr(explode(" ", $datumincas)[0], 0, -1)); // da ni .
$datum['mesecbeseda'] = explode(" ", $datumincas)[1];
@@ -786,7 +783,7 @@ Errors:
}
return $ocene;
}
- public function fetchvsasporocila($katera = 0) {
+ public function fetchvsasporocila($katera = 0) { // prepočasi
$msgs = null;
foreach($this->fetchsporocilaseznam($katera) as $mesidz) {
$msgs[] = $this->fetchsporocilo($mesidz['id']);