Update 3.1.4

This commit is contained in:
Alchemy
2011-02-24 14:23:54 +01:00
parent b12242f3f4
commit d6c7c7b206
31 changed files with 2373 additions and 2146 deletions

View File

@@ -71,7 +71,7 @@ class answer
$preview = '/include/directprev.php%3F'."bas%3D".$base_id."%26rec%3D".$record_id;
$JS_roll = '<div class="imgTips" style="z-index:99;width:'.((int)$sd["preview"]["width"]+10).'px;height:'.((int)$sd["preview"]["height"]+10).'px" id="rolloverpreview"></div>
<script type="text/javascript">flowplayer("rolloverpreview", {src:"/include/flowplayer/flowplayer-3.2.2.swf", wmode: "transparent"}, {clip:{url:"'.$preview.'",autoPlay: true,autoBuffering:true,provider: "h264streaming",scaling:"fit"}, onError:function(code,message){getNewVideoToken('.$base_id.', '.$record_id.', this);},plugins: {h264streaming: {url: "/include/flowplayer/flowplayer.pseudostreaming-3.2.2.swf"}}});</script>';
<script type="text/javascript">flowplayer("rolloverpreview", {src:"/include/flowplayer/flowplayer-3.2.6.swf", wmode: "transparent"}, {clip:{url:"'.$preview.'",autoPlay: true,autoBuffering:true,provider: "h264streaming",scaling:"fit"}, onError:function(code,message){getNewVideoToken('.$base_id.', '.$record_id.', this);},plugins: {h264streaming: {url: "/include/flowplayer/flowplayer.pseudostreaming-3.2.6.swf"}}});</script>';
}
}
@@ -256,12 +256,12 @@ class answer
$token = md5(time().mt_rand(100000,999999));
$html_view = '<div class="record record_video" style="width:'.$width.'px;height:'.$height.'px;">
<div id="preview_'.$base_id.'_'.$record_id.'_'.$token.'" class="PNB" style=""></div>
<div id="rolloverpreview" class="PNB" style=""></div>
<input type="hidden" name="width" value="'.$width.'"/>
<input type="hidden" name="height" value="'.$height.'"/>
</div><script type="text/javascript">flowplayer("preview_'.$base_id.'_'.$record_id.'_'.$token.'",{src:"/include/flowplayer/flowplayer-3.2.2.swf", wmode: "transparent"},{clip:{url:"'.$preview.'",autoPlay: true,autoBuffering:true,provider: "h264streaming",scaling:"fit"},onError:function(code,message){getNewVideoToken('.$base_id.', '.$record_id.', this);},plugins: {h264streaming: {url: "/include/flowplayer/flowplayer.pseudostreaming-3.2.2.swf"}}});</script>';
</div><script type="text/javascript">flowplayer("rolloverpreview",{src:"/include/flowplayer/flowplayer-3.2.6.swf", wmode: "transparent"},{clip:{url:"'.$preview.'",autoPlay: true,autoBuffering:true,provider: "h264streaming",scaling:"fit"},onError:function(code,message){getNewVideoToken('.$base_id.', '.$record_id.', this);},plugins: {h264streaming: {url: "/include/flowplayer/flowplayer.pseudostreaming-3.2.6.swf"}}});</script>';
$preview = '<div id="FLASHPREVIEW" class="PREVIEW_PIC" style="margin:0 auto;width: 600px; height: 300px;" ></div>';
$preview = '<div id="rolloverpreview" class="PREVIEW_PIC" style="margin:0 auto;width: 600px; height: 300px;" ></div>';
// $width = $height = '200';
}
elseif(in_array($sdMain[$typedoc]['mime'],$gviewer_docs))
@@ -453,7 +453,6 @@ class answer
$basesettings = phrasea::load_settings($locale);
$captions = _('reponses::record::Pas de description');
$xsl = '';
@@ -470,8 +469,8 @@ class answer
if($dom_doc->loadXML($xml))
{
$XPATH_thesaurus = databox::get_xpath_thesaurus($sbas_id);
$XPATH_struct = databox::get_xpath_structure($sbas_id);
$DOM_thFields = array();
if($XPATH_struct)
@@ -496,16 +495,16 @@ class answer
$context_noacc = noaccent_utf8($context_noacc, PARSED);
if($context_noacc)
{
$q = "($tbranch)//sy[@w='".$term_noacc."' and @k='".$context_noacc."']";
$q = "//sy[@w='".$term_noacc."' and @k='".$context_noacc."']";
}
else
{
$q = "($tbranch)//sy[@w='".$term_noacc."' and not(@k)]";
$q = "//sy[@w='".$term_noacc."' and not(@k)]";
}
$t = "";
foreach($DOM_branchs as $DOM_branch)
{
$nodes = $XPATH_thesaurus->query($q, $DOM_branch);
$nodes = $XPATH_thesaurus->cache_query($q, $DOM_branch, $tbranch);
if($nodes->length > 0)
{
$lngfound = false;
@@ -529,12 +528,12 @@ class answer
$t .= "');return(false);\"]]";
$t .= $fvalue;
$t .= "[[/a]]";
$lngfound = true;
break;
}
$synonyms = $XPATH_thesaurus->query("sy[@lng='" . $session->usr_i18 . "']", $node->parentNode);
$synonyms = $XPATH_thesaurus->query("sy[@lng='" . $session->usr_i18n . "']", $node->parentNode);
foreach($synonyms as $synonym)
{
$k = $synonym->getAttribute("k");
@@ -554,7 +553,6 @@ class answer
$t .= "');return(false);\"]]";
$t .= $link;
$t .= "[[/a]]";
$lngfound = true;
break;
}
@@ -1204,3 +1202,5 @@ class answer
return($value);
}
}

View File

@@ -2,6 +2,7 @@
abstract class base
{
var $schema = false;
var $conn = false;
var $dbname = false;
@@ -11,7 +12,6 @@ abstract class base
var $host = false;
var $type = false;
function init_conn()
{
require dirname(__FILE__) . '/../../config/connexion.inc';
@@ -31,7 +31,6 @@ abstract class base
}
function load_schema($schema_type)
{
$this->schema = false;
@@ -69,7 +68,6 @@ abstract class base
}
else
return false;
}
return false;
}
@@ -80,7 +78,8 @@ abstract class base
$create_stmt = "CREATE TABLE `" . mysql_real_escape_string($table['name'], $this->conn) . "` (";
foreach($table->fields->field as $field){
foreach ($table->fields->field as $field)
{
$isnull = trim($field->null) == "" ? "NOT NULL" : "NULL";
@@ -100,53 +99,62 @@ abstract class base
$code = array_pop(array_reverse(explode('_', $collation)));
$character_set = ' CHARACTER SET ' . $code . ' COLLATE ' . $collation;
}
$field_stmt[] = " `" . mysql_real_escape_string($field->name, $this->conn) . "` " . $field->type . " " . $field->extra . " " . $character_set . " " . $is_default . " " . $isnull . "";
}
if($table->indexes){
foreach($table->indexes->index as $index){
switch($index->type){
if ($table->indexes)
{
foreach ($table->indexes->index as $index)
{
switch ($index->type)
{
case "PRIMARY":{
case "PRIMARY":
{
$primary_fields = array();
foreach($index->fields->field as $field){
foreach ($index->fields->field as $field)
{
$primary_fields[] = "`" . mysql_real_escape_string($field, $this->conn) . "`";
}
$field_stmt[] = 'PRIMARY KEY (' . implode(',', $primary_fields) . ')';
};break;
};
break;
case "UNIQUE":{
case "UNIQUE":
{
$unique_fields = array();
foreach($index->fields->field as $field){
foreach ($index->fields->field as $field)
{
$unique_fields[] = "`" . mysql_real_escape_string($field, $this->conn) . "`";
}
$field_stmt[] = 'UNIQUE KEY `' . mysql_real_escape_string($index->name, $this->conn) . '` (' . implode(',', $unique_fields) . ')';
};break;
};
break;
case "INDEX":{
case "INDEX":
{
$index_fields = array();
foreach($index->fields->field as $field){
foreach ($index->fields->field as $field)
{
$index_fields[] = "`" . mysql_real_escape_string($field, $this->conn) . "`";
}
$field_stmt[] = 'KEY `' . mysql_real_escape_string($index->name, $this->conn) . '` (' . implode(',', $index_fields) . ')';
};break;
}
};
break;
}
}
if($table->defaults){
}
if ($table->defaults)
{
foreach ($table->defaults->default as $default)
{
@@ -165,7 +173,6 @@ abstract class base
$defaults_stmt[] = 'INSERT INTO ' . mysql_real_escape_string($table['name'], $this->conn) . ' (' . $k . ') VALUES (' . $v . ') ';
}
}
@@ -183,7 +190,6 @@ abstract class base
{
mysql_query($def, $this->conn);
}
}
private function upgradeTable($table)
@@ -406,7 +412,6 @@ abstract class base
foreach ($correct_table['indexes'] as $kIndex => $expr)
$alter[] = 'ALTER TABLE `' . $table['name'] . '` ADD ' . $expr;
}
$return = true;
@@ -431,10 +436,8 @@ abstract class base
}
return $return;
}
function upgradeDb()
{
require_once dirname(__FILE__) . '/../version.inc';
@@ -531,7 +534,6 @@ abstract class base
return $success;
}
function upgradeAvalaible()
{
if ($this->type == 'application_box')
@@ -600,7 +602,4 @@ abstract class base
return '0.0.0';
}
}

View File

@@ -1,11 +1,21 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class connection
{
private $private_connect = false;
private $private_lockedtables; // tableau assoc. des bases lockees
private static $_instance = array();
private static $_PDO_instance = array();
private static $_query_counter = array();
private $_id;
private $_name = false;
@@ -35,16 +45,58 @@ class connection
}
}
// if(!self::$_instance[$name]->isok())
// {
// header("HTTP/1.0 500 Internal Server Error");
// die('<h2>HTTP/1.0 500 Internal Server Error</h2><h2>Can\'t establish database connection<h2>');
// }
return array_key_exists($name, self::$_instance) ? self::$_instance[$name] : false;
}
/**
*
* @param string $name
* @return PDO
*/
public static function getPDOConnection($name = null)
{
if (!isset(self::$_PDO_instance[$name]))
{
$hostname = $port = $user = $password = $dbname = false;
$connection_params = array();
if (trim($name) !== '')
{
$connection_params = phrasea::sbas_params();
}
else
{
require (dirname(__FILE__) . '/../../config/connexion.inc');
$name = 'app_box';
}
if (isset($connection_params[$name]))
{
$hostname = $connection_params[$name]['host'];
$port = $connection_params[$name]['port'];
$user = $connection_params[$name]['user'];
$password = $connection_params[$name]['pwd'];
$dbname = $connection_params[$name]['dbname'];
}
$dsn = 'mysql:dbname=' . $dbname . ';host=' . $hostname.';port='.$port.';';
try
{
self::$_PDO_instance[$name] = new PDO($dsn, $user, $password);
self::$_PDO_instance[$name]->query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");
}
catch (Exception $e)
{
throw new Exception('Connection not avalaible');
}
}
if (array_key_exists($name, self::$_PDO_instance))
return self::$_PDO_instance[$name];
throw new Exception('Connection not avalaible');
}
function __construct($name)
{

View File

@@ -1,5 +1,7 @@
<?php
class databox extends base {
class databox extends base
{
var $id = false;
// var $request_mails = array();
@@ -23,6 +25,27 @@ class databox extends base {
'user' => $user,
'password' => $password
);
elseif ($id !== false)
{
try
{
$conn = connection::getPDOConnection();
$sql = 'SELECT host, port, user, pwd FROM sbas WHERE sbas_id= :sbas_id';
$stmt = $conn->prepare($sql);
$stmt->execute(array(':sbas_id' => $id));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$newServer = array(
'hostname' => $row['host'],
'port' => $row['port'],
'user' => $row['user'],
'password' => $row['pwd']
);
}
catch (Exception $e)
{
}
}
if ($this->init_data_conn($newServer) === false)
return false;
@@ -53,15 +76,6 @@ class databox extends base {
}
$conn->free_result($rs);
}
// $sql = 'SELECT value FROM pref WHERE prop="mail_request"';
// if($rs = mysql_query($sql,$this->conn))
// {
// while($row = mysql_fetch_assoc($rs))
// {
// $this->request_mails[] = $row['value'];
// }
// mysql_free_result($rs);
// }
return false;
}
@@ -155,7 +169,6 @@ class databox extends base {
return $this->id;
}
function create($dbname)
{
$this->createDb($dbname);
@@ -295,6 +308,8 @@ class databox extends base {
{
$contents = file_get_contents($data_template);
$baseurl = $baseurl ? p4string::addEndSlash($baseurl) : '';
$contents = str_replace(
array("{{dataurl}}", "{{basename}}", "{{datapathweb}}", "{{datapathnoweb}}"),
array($baseurl, $this->dbname, $path_web, $path_doc),
@@ -347,7 +362,6 @@ class databox extends base {
return false;
}
public static function printStatus($name)
{
@@ -421,7 +435,6 @@ class databox extends base {
return($tbas);
}
public static function get_dom_thesaurus($sbas_id)
{
if (isset(self::$_dom_thesaurus[$sbas_id]))
@@ -448,7 +461,7 @@ class databox extends base {
$DOM_thesaurus = self::get_dom_thesaurus($sbas_id);
if($DOM_thesaurus && ($tmp = new DOMXPath( $DOM_thesaurus )) !== false)
if ($DOM_thesaurus && ($tmp = new phrasea_DOMXPath($DOM_thesaurus)) !== false)
self::$_xpath_thesaurus[$sbas_id] = $tmp;
else
self::$_xpath_thesaurus[$sbas_id] = false;
@@ -456,7 +469,6 @@ class databox extends base {
return self::$_xpath_thesaurus[$sbas_id];
}
public static function get_sxml_thesaurus($sbas_id)
{
@@ -475,7 +487,6 @@ class databox extends base {
return self::$_sxml_thesaurus[$sbas_id];
}
public static function get_thesaurus($sbas_id)
{
$cache_appbox = cache_appbox::getInstance();
@@ -512,7 +523,6 @@ class databox extends base {
return self::$_thesaurus[$sbas_id];
}
public static function get_structure($sbas_id)
{
$session = session::getInstance();
@@ -525,7 +535,6 @@ class databox extends base {
return false;
}
public static function get_dom_structure($sbas_id)
{
if (isset(self::$_dom_structure[$sbas_id]))
@@ -549,8 +558,6 @@ class databox extends base {
return self::$_dom_structure[$sbas_id];
}
public static function get_sxml_structure($sbas_id)
{
if (isset(self::$_sxml_structure[$sbas_id]))
@@ -568,7 +575,6 @@ class databox extends base {
return self::$_sxml_structure[$sbas_id];
}
public static function get_xpath_structure($sbas_id)
{
if (isset(self::$_xpath_structure[$sbas_id]))
@@ -661,4 +667,18 @@ class databox extends base {
return $AvSubdefs;
}
}
class phrasea_DOMXPath extends DOMXPath
{
static $r = array();
function cache_query($xquery, $context_node=NULL, $context_path='')
{
$context_path .= $xquery;
if(!array_key_exists($context_path, self::$r))
self::$r[$context_path] = $context_node ? parent::query($xquery, $context_node) : parent::query($xquery);
return(self::$r[$context_path]);
}
}

View File

@@ -699,7 +699,19 @@ class export
if(GV_modxsendfile)
{
$file_xaccel = str_replace(array(GV_X_Accel_Redirect, GV_RootPath.'tmp/download/'), array('/'.GV_X_Accel_Redirect_mount_point.'/', '/download/'), $file);
$file_xaccel = str_replace(
array(
GV_X_Accel_Redirect,
GV_RootPath . 'tmp/download/',
GV_RootPath . 'tmp/lazaret/'
)
, array(
'/' . GV_X_Accel_Redirect_mount_point . '/',
'/download/',
'/lazaret/'
)
, $file
);
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

View File

@@ -48,13 +48,21 @@ class mail
return self::send_mail($subject, $body, $to);
}
public static function send_documents($email, $url,$from, $message='',$accuse)
public static function send_documents($email, $url, $from, $endate_obj, $message='', $accuse)
{
$subject = _('export::vous avez recu des documents');
$body = '<div>' . _('Vous avez recu des documents, vous pourrez les telecharger a ladresse suivante ') . "</div>\n";
$body .= "<a title='' href='" . $url . "'>" . $url . "</a>\n";
$body .= '<br><div>' .
sprintf(
_('Attention, ce lien lien est valable jusqu\'au %s'),
phraseadate::getDate($endate_obj) . ' ' . phraseadate::getTime($endate_obj)
)
. '</div>';
if ($message != '')
{
$body .= "<div>---------------------------------------------------</div>\n" . $message;
@@ -78,7 +86,6 @@ class mail
return self::send_mail($subject, $body, $to);
}
public static function register_confirm($email, $accept, $deny)
{
@@ -100,7 +107,6 @@ class mail
return self::send_mail($subject, $body, $to);
}
public static function register_user($email, $auto, $others)
{
@@ -187,7 +193,6 @@ class mail
return self::send_mail($subject, $body, $to);
}
public static function send_mail($subject, $body, $to, $from=false, $files=array(), $reading_confirm_to=false)
{
require_once(GV_RootPath . 'lib/PHPMailer_v5.1/class.phpmailer.php');
@@ -204,7 +209,8 @@ class mail
$body .= '<div><a href="' . GV_ServerName . '">' . GV_ServerName . "</a></div>\n";
$body = '<body>' . $body . '</body>';
try {
try
{
$mail->CharSet = 'utf-8';
$mail->Encoding = 'base64'; //'quoted-printable';
@@ -264,4 +270,5 @@ class mail
return $e->getMessage();
}
}
}

View File

@@ -37,7 +37,7 @@ class phraseadate
$diff = $compareTo->format('U') - $date->format('U');
$dayDiff = floor($diff / 86400);
if(is_nan($dayDiff) || $dayDiff < 0) {
if(is_nan($dayDiff)) {
return '';
}

View File

@@ -247,7 +247,6 @@ class query
$dstatus = status::getDisplayStatus();
$array_icons = array(
'flash' => '',
'document' => '',
@@ -309,6 +308,7 @@ class query
$thumbnail = answer::getThumbnail($session->ses_id, $data["base_id"], $data["record_id"],GV_zommPrev_rollover_clientAnswer);
if($thumbnail['sha256'])
$rsScreen[$irec]['sha256'] = $thumbnail['sha256'];
@@ -322,6 +322,7 @@ class query
if(isset($data) && isset($data["status"]))
{

View File

@@ -453,6 +453,7 @@ function getPreviewWindow($usr,$ses,$lng,$env,$pos,$contId,$roll)
$prev = answer::get_preview($bas,$rec,$isFullyPublic);
$preview_html = $prev['html'];
$preview = $prev['preview'];
$flashcontent = $prev['flashcontent'];
$width = $prev['width'];
@@ -678,6 +679,7 @@ function getPreviewWindow($usr,$ses,$lng,$env,$pos,$contId,$roll)
return p4string::jsonencode(array(
"prev"=>$preview
,"prev_html"=>$preview_html
,"flashcontent"=>$flashcontent
,"desc"=>p4string::entitydecode($caption)
,"width"=>$width

View File

@@ -170,7 +170,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -179,7 +183,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -190,7 +198,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -199,7 +211,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>

View File

@@ -173,7 +173,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -182,7 +186,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -193,7 +201,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>
@@ -201,7 +213,11 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/record/description/*">
<b><xsl:value-of select="name()" /></b> : <xsl:value-of select="current()" /><br />
<b>
<xsl:value-of select="name()" />
</b> :
<xsl:value-of select="current()" />
<br />
</xsl:template>
</xsl:stylesheet>
</layout>

View File

@@ -1849,7 +1849,7 @@ function make1subdef($infile, $sd, $physdpath, $infos)
// attention, au cas ou il y aurait des espaces dans le path, il faut des quotes
// windows n'accepte pas les simple quotes
// pour mac les quotes pour les noms de fichiers sont indispensables car si il y a un espace -> ca plante
$array = array('application/pdf','image/psd','image/vnd.adobe.photoshop','image/photoshop','image/ai','image/illustrator','image/vnd.adobe.illustrator');
$array = array('image/tiff', 'application/pdf','image/psd','image/vnd.adobe.photoshop','image/photoshop','image/ai','image/illustrator','image/vnd.adobe.illustrator');
if( in_array($infos['mime'], $array ) )
$cmd .= ' "'.$infile .'[0]" "'. $outfile .'"';
else

View File

@@ -46,7 +46,7 @@
{% endif %}
{# MODULE #}
{% if module == "validation" %}
{% if module == "lightbox" %}
<b>{% trans 'admin::monitor: module validation' %}</b>
{% else %}
<a id="validation_link" style="display:"

View File

@@ -138,4 +138,9 @@
{% if lazaret|length == 0 %}
<div style="margin:20px 10px;">{% trans 'Aucun document dans la quarantaine actuellement' %}</div>
{% endif %}
<script type="text/javascript">
$(document).ready(function(){
$('.tooltip').tooltip();
});
</script>
</div>

View File

@@ -135,8 +135,7 @@ if($request->has_post_datas() && $user->is_admin === true)
}
}
}
elseif($parm['mount_base'] && $parm['new_hostname'] && $parm['new_port'] && $parm['new_user']
&& $parm['new_password'] && $parm['new_dbname'])
elseif($parm['mount_base'])
{
if(!$parm['new_settings'] && $parm['new_dbname'])
{
@@ -160,9 +159,8 @@ if($request->has_post_datas() && $user->is_admin === true)
}
}
elseif($parm['new_settings'] && $parm['new_hostname'] && $parm['new_port'] && $parm['new_user']
&& $parm['new_password'] && $parm['new_dbname'] && $parm['new_data_template'])
&& $parm['new_password'] && $parm['new_dbname'])
{
if(p4string::hasAccent($parm['new_dbname']))
$error['new_dbname'] = 'No special chars in dbname';
@@ -170,7 +168,7 @@ if($request->has_post_datas() && $user->is_admin === true)
{
if( ($base = new databox(false,$parm['new_hostname'],$parm['new_port'],$parm['new_user'],$parm['new_password'])) !== false )
{
if($base->mount($parm['new_dbname']))
if($base->mount($parm['new_dbname'], $usr_id))
{
$sbas_id = $base->save($usr_id);

View File

@@ -92,7 +92,12 @@ if($connbas)
if($parm["act"]=="CHGSTRUCTURE")
{
$errors = databox::get_structure_errors($parm["str"]);
if(count($errors) == 0 && $domst = @DOMDocument::loadXML($parm["str"])) // simplexml_load_string($parm["str"]))
if(count($errors) == 0)
{
$domst = new DOMDocument('1.0', 'UTF-8');
$domst->preserveWhiteSpace = false;
$domst->formatOutput = true;
if(@$domst->loadXML($parm["str"]))
{
$domst->documentElement->setAttribute("modification_date", $now = date("YmdHis"));
@@ -105,6 +110,12 @@ if($connbas)
cache_databox::update($parm["p0"],'structure');
}
else
{
$errors[] = "Error loadXML(structure)";
}
}
if(count($errors) != 0)
{
$msg .= p4string::MakeString(_('admin::base: xml invalide, les changements ne seront pas appliques'), 'js') . "" ;
$loadit = false;

View File

@@ -662,7 +662,7 @@ if($cssfile)
<input type="hidden" name="app" value="client">
</form>
<script type="text/javascript" src="/include/minify/g=client"></script>
<script type="text/javascript" src="/include/flowplayer/flowplayer-3.2.2.min.js"></script>
<script type="text/javascript" src="/include/flowplayer/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript">

View File

@@ -94,7 +94,7 @@ function openPreview(env, pos, contId, reload){
'display': 'none'
});
$('#PREVIEWIMGCONT').empty();
empty_preview();
prevAjax = $.ajax({
type: "POST",
@@ -114,6 +114,7 @@ function openPreview(env, pos, contId, reload){
$('#current_result_n').empty().append(parseInt(pos)+1);
prevAjaxrunning = true;
$('#PREVIEWIMGDESC, #PREVIEWOTHERS').addClass('loading');
empty_preview();
},
error: function(data){
prevAjaxrunning = false;
@@ -139,7 +140,14 @@ function openPreview(env, pos, contId, reload){
return;
}
$('#PREVIEWIMGCONT').empty().append(data.prev);
if((data.type == 'video'))
{
$('#PREVIEWIMGCONT').html(data.prev_html);
}
else
{
$('#PREVIEWIMGCONT').html(data.prev);
}
$('#PREVIEWIMGDESCINNER').empty().append(data.desc);
$('#HISTORICOPS').empty().append(data.history);
@@ -171,7 +179,8 @@ function openPreview(env, pos, contId, reload){
p4.preview.current.pos = data.pos;
p4.preview.current.flashcontent = data.flashcontent;
if ((data.type == 'video' || data.type == 'audio' || data.type == 'flash')) {
if ((data.type == 'video' || data.type == 'audio' || data.type == 'flash'))
{
if(data.type != 'video' && p4.preview.current.flashcontent.url)
{
var flashvars = false;
@@ -192,22 +201,32 @@ function openPreview(env, pos, contId, reload){
}
else
{
flowplayer("FLASHPREVIEW", '/include/flowplayer/flowplayer-3.2.2.swf', {
clip: {
autoPlay: true,
autoBuffering:true,
provider: 'h264streaming',
metadata: false,
scaling:'fit',
url: data.flashcontent.flv
},
onError:function(code,message){getNewVideoToken(data.base_id, data.record_id, this);},
plugins: {
h264streaming: {
url: '/include/flowplayer/flowplayer.pseudostreaming-3.2.2.swf'
}
}
});
// alert(data.flashcontent.flv);
// try
// {
// flowplayer("FLASHPREVIEW", {src:"/include/flowplayer/flowplayer-3.2.6.swf", wmode: "transparent"}, {
// clip: {
// autoPlay: true,
// autoBuffering:true,
// provider: 'h264streaming',
// metadata: false,
// scaling:'fit',
// url: data.flashcontent.flv
// },
// onError:function(code,message){getNewVideoToken(data.base_id, data.record_id, this);},
// plugins: {
// h264streaming: {
// url: '/include/flowplayer/flowplayer.pseudostreaming-3.2.6.swf'
// }
// }
// });
// $('#PREVIEWIMGDESCINNER').empty().append('<textarea></textarea>').find('textarea').val($('#FLASHPREVIEW').html());
//
// }
// catch(err)
// {
// alert(err);
// }
}
}
@@ -365,10 +384,20 @@ function setTitle(title){
function cancelPreview(){
$('#PREVIEWIMGDESCINNER').empty();
$('#PREVIEWIMGCONT').empty();
empty_preview();
p4.preview.current = false;
}
function empty_preview()
{
var player_cont = $('#PREVIEWIMGCONT object').parent();
if(player_cont.attr('id') != 'PREVIEWIMGCONT')
{
player_cont.empty();
player_cont.remove();
}
$('#PREVIEWIMGCONT').empty();
}
function startSlide(){
if (!p4.slideShow) {
@@ -580,6 +609,7 @@ function doudouMode(){
function closePreview(){
p4.preview.open = false;
empty_preview();
hideOverlay();
$('#PREVIEWBOX').fadeTo(500, 0);

View File

@@ -143,6 +143,11 @@
// save elements title before the tooltip is displayed
function save(event) {
// if this is the current source, or it has no title (occurs with click event), stop
if(event.stopPropagation)
event.stopPropagation();
event.cancelBubble = true;
if ( $.tooltip.blocked || this == $.tooltip.current || (!this.tooltipText && !settings(this).bodyHandler) )
return;
@@ -509,6 +514,9 @@
$.tooltip.current = null;
function complete() {
helper.parent.removeClass( tsettings.extraClass ).hide().css("opacity", "");
var el =helper.parent.find('object').parent();
el.empty();
el.remove();
}
if ((!IE || !$.fn.bgiframe) && tsettings.fade) {
if (helper.parent.is(':animated'))

View File

@@ -95,7 +95,7 @@ $groups = array(
,'//prod/jquery.order.js'
,'//include/jslibs/jquery.sprintf.1.0.3.js'
, '//include/jquery.tooltip.js'
, '//include/flowplayer/flowplayer-3.2.2.min.js'
, '//include/flowplayer/flowplayer-3.2.6.min.js'
, '//include/jquery.p4.preview.js'
, '//prod/jquery.edit.js'
, '//include/jslibs/jquery.color.animation.js'
@@ -134,7 +134,7 @@ $groups = array(
,'//include/jslibs/jquery.contextmenu_scroll.js'
,'//include/jquery.common.js'
,'//lightbox/jquery.lightbox.js'
, '//include/flowplayer/flowplayer-3.2.2.min.js'
, '//include/flowplayer/flowplayer-3.2.6.min.js'
),
'lightboxie6' => array(
'//include/jslibs/jquery-1.4.4.js'
@@ -148,7 +148,7 @@ $groups = array(
, '//include/jslibs/jquery.contextmenu_scroll.js'
,'//include/jquery.common.js'
,'//lightbox/jquery.lightbox.ie6.js'
, '//include/flowplayer/flowplayer-3.2.2.min.js'
, '//include/flowplayer/flowplayer-3.2.6.min.js'
)
);

View File

@@ -117,7 +117,7 @@ phrasea::headers();
padding:50px 0 20px;
}
</style>
<script type="text/javascript" src="/include/flowplayer/flowplayer-3.2.2.min.js"></script>
<script type="text/javascript" src="/include/flowplayer/flowplayer-3.2.6.min.js"></script>
</head>
<body>
<?php
@@ -142,7 +142,7 @@ phrasea::headers();
$embed = '<img src="'.$url.'" title="" />';
break;
case 'video':
$embed = '<div style="width: 600px; height: 400px;" id="flash_preview"></div><script type="text/javascript">flowplayer("flash_preview", "/include/flowplayer/flowplayer-3.2.2.swf", "'.$url.'");</script>';
$embed = '<div style="width: 600px; height: 400px;" id="flash_preview"></div><script type="text/javascript">flowplayer("flash_preview", "/include/flowplayer/flowplayer-3.2.6.swf", "'.$url.'");</script>';
break;
case 'document':
$embed = '<object width="850" height="500" type="application/x-shockwave-flash" data="/include/FlexPaper_flash/FlexPaperViewer.swf" style="visibility: visible; width: 850px; height: 500px; top: 0px;">

View File

@@ -52,7 +52,8 @@ $list = $download->prepare_export($parm['obj'], $titre);
$list['export_name'] = $exportname.'.zip';
$endDate = phraseadate::format_mysql(new DateTime('+1 day'));
$endate_obj = new DateTime('+1 day');
$endDate = phraseadate::format_mysql($endate_obj);
$token = random::getUrlToken('download',false,$endDate,serialize($list));
@@ -75,7 +76,7 @@ if($parm['reading_confirm'] == '1')
foreach($dest as $email)
{
if(($result = mail::send_documents(trim($email), $url,$from, $parm["textmail"], $reading_confirm_to))!==true)
if(($result = mail::send_documents(trim($email), $url,$from, $endate_obj, $parm["textmail"], $reading_confirm_to))!==true)
$res[] = $email;
}

View File

@@ -51,7 +51,7 @@ try
'baskets_collection' => $basket_collection,
'basket' => $basket,
'local_title' => strip_tags($basket->name),
'module' => 'validation',
'module' => 'lightbox',
'module_name' => _('admin::monitor: module validation')
)
);

View File

@@ -26,10 +26,10 @@ $item = $defaultchannel->appendChild($defaultdom->createElement('item'));
$title = $item->appendChild($defaultdom->createElement('title'));
$title->appendChild($defaultdom->createTextNode(GV_homeTitle));
if(file_exists(GV_RootPath.'config/home.jpg'))
if(file_exists(GV_RootPath.'www/custom/home.jpg'))
{
$pathPic = GV_RootPath.'config/home.jpg';
$urlPic = '/config/home.jpg';
$pathPic = GV_RootPath.'www/custom/home.jpg';
$urlPic = '/custom/home.jpg';
}
else
{

View File

@@ -78,11 +78,11 @@ if($parm['recordtype'] != '' && in_array($parm['recordtype'],array('image','vide
$query = new query($options);
$result = $query->results($parm['qry'], $parm["pag"]); //$parm['search_type'],
$proposals = trim($parm['pag']) === '' ? $query->proposals() : false;
$npages = $result['pages'];
$page = $result['current_page'];
$string = '';
@@ -136,15 +136,10 @@ $string ='';
}
$string .= "<a onclick='gotopage(" . ($npages) . ");return false;'>&gt;&gt;</a>";
}
}
$string .= '<div style="display:none;"><div id="NEXT_PAGE"></div><div id="PREV_PAGE"></div></div>';
$explain = $result['explain'];
$infoResult = ' | <a href="#" class="infoDialog" infos="' . str_replace('"', '&quot;', $explain) . '">' . sprintf(_('reponses:: %d reponses'), $session->prod['query']['nba']) . '</a> | ' . sprintf(_('reponses:: %s documents selectionnes'), '<span id="nbrecsel"></span>');
@@ -168,7 +163,6 @@ $string ='';
echo '</div>';
}
function proposalsToHTML(&$proposals)
{
$html = "<div class=\"proposals\">";
@@ -217,14 +211,20 @@ $(document).ready(function(){
<?php
}
?>
<?php if($page>1 && $session->prod['query']['nba']>0){ ?>
<?php if ($page > 1 && $session->prod['query']['nba'] > 0)
{ ?>
$("#PREV_PAGE").bind('click',function(){gotopage(<?php echo ($page - 1) ?>)});
<?php }else{?>
<?php }
else
{ ?>
$("#PREV_PAGE").unbind('click');
<?php }
if($page<$npages && $session->prod['query']['nba']>0){ ?>
if ($page < $npages && $session->prod['query']['nba'] > 0)
{ ?>
$("#NEXT_PAGE").bind('click',function(){gotopage(<?php echo ($page + 1) ?>)});
<?php }else{?>
<?php }
else
{ ?>
$("#NEXT_PAGE").unbind('click');
<?php } ?>
p4.tot = <?php echo ((is_int((int) $session->prod['query']['nba']) && (int) $session->prod['query']['nba'] >= 0) ? (int) $session->prod['query']['nba'] : 0) ?>;

View File

@@ -910,7 +910,7 @@ function HTML_Thesaurus(&$html)
$class_status = '';
}
?>
<div pos="<?php echo $idia ?>" id="idEditDiapo_<?php echo $idia ?>" class="diapo <?php echo $class_status; ?>" style="<?php echo $diapostyle ?>;">
<div pos="<?php echo $idia ?>" id="idEditDiapo_<?php echo $idia ?>" class="diapo <?php echo $class_status; ?> <?php echo $basrec['type'] ?>_bloc" style="<?php echo $diapostyle ?>;">
<div class='titre'>
<?php echo p4string::MakeString($basrec['originalname'], 'html') . "\n" ?>
</div>

View File

@@ -776,6 +776,8 @@ $rss_infos = user::getMyRss();
<script type="text/javascript" src="/include/swfobject/swfobject.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery-1.4.4.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery-ui-1.7.2.js"></script>
<script type="text/javascript" src="/include/colorpicker/js/colorpicker.js"></script>
<script type="text/javascript" src="/include/jslibs/json2.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery.cookie.js"></script>
<script type="text/javascript" src="/include/jquery.common.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery.form.2.49.js"></script>
@@ -783,6 +785,7 @@ $rss_infos = user::getMyRss();
<script type="text/javascript" src="/include/jslibs/json2.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery.sprintf.1.0.3.js"></script>
<script type="text/javascript" src="/include/jquery.tooltip.js"></script>
<script type="text/javascript" src="/include/flowplayer/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="/include/jquery.p4.preview.js"></script>
<script type="text/javascript" src="/prod/jquery.edit.js"></script>
<script type="text/javascript" src="/include/jslibs/jquery.color.animation.js"></script>
@@ -1245,6 +1248,17 @@ $rss_infos = user::getMyRss();
?>
<!-- <li><a href="#popular-queries">Popular</a></li>-->
</ul>
<div id="bases-queries" class="PNB" style="top:30px;overflow:hidden;">
<div class="PNB10" style="overflow-y:auto;overflow-x:auto;">
<?php echo $outB.str_replace('__UNIQUEID__',mt_rand(10000,99999),implode('<div><hr/></div>',$sbase));?>
</div>
</div>
<div id="history-queries" class="PNB" style="top:30px;overflow:hidden;">
<div class="PNB10" style="overflow-y:auto;overflow-x:auto;">
<?php echo queries::history(); ?>
</div>
</div>
<?php
if(queries::topics_exists())
{
@@ -1262,17 +1276,6 @@ $rss_infos = user::getMyRss();
<?php
}
?>
<div id="bases-queries" class="PNB" style="top:30px;overflow:hidden;">
<div class="PNB10" style="overflow-y:auto;overflow-x:auto;">
<?php echo $outB.str_replace('__UNIQUEID__',mt_rand(10000,99999),implode('<div><hr/></div>',$sbase));?>
</div>
</div>
<div id="history-queries" class="PNB" style="top:30px;overflow:hidden;">
<div class="PNB10" style="overflow-y:auto;overflow-x:auto;">
<?php echo queries::history(); ?>
</div>
</div>
<!-- <div id="popular-queries" class="PNB" style="top:30px;overflow:hidden;">-->
<!-- <div class="PNB10" style="overflow-y:auto;overflow-x:auto;">-->
<!---->

View File

@@ -852,7 +852,7 @@ function edit_clk_editimg(evt, i)
}
}
$('#TH_Opreview .PNB10').empty();
empty_preview_edit();
var selected = $('#EDIT_FILM2 .diapo.selected');
if(selected.length == 1)
@@ -1234,6 +1234,7 @@ function edit_applyMultiDesc(evt)
var sendorder = "";
var sendChuOrder = "";
empty_preview_edit();
var t = "";
if(p4.edit.textareaIsDirty && edit_validField(evt, "ask_ok")==false)
@@ -1334,7 +1335,7 @@ function edit_applyMultiDesc(evt)
function edit_cancelMultiDesc(evt)
{
empty_preview_edit();
var dirty = false;
evt.cancelBubble = true;
@@ -1502,6 +1503,7 @@ function EditThesaurusSeeker(sbas_id)
this.jq = $.ajax({
url: url,
data: parms,
type:'POST',
success: function(ret)
{
me.TH_P_node.html("...");
@@ -1855,7 +1857,7 @@ function vsplit2()
function setPreviewEdit()
{
if(!$('#EDITWINDOW').is(':visible'))
if(!$('#TH_Opreview').is(':visible'))
return false;
var selected = $('#EDIT_FILM2 .diapo.selected');
@@ -1936,10 +1938,21 @@ function setPreviewEdit()
}
function empty_preview_edit()
{
var el = $('#TH_Opreview .PNB10 object').parent();
if(el.parent().attr('id') != 'TH_Opreview')
{
el.empty();
el.remove();
}
$('#TH_Opreview .PNB10').empty();
}
function previewEdit(r)
{
$('#TH_Opreview .PNB10').empty().append(p4.edit.T_records[r].preview.preview);
empty_preview_edit();
$('#TH_Opreview .PNB10').append(p4.edit.T_records[r].preview.preview);
var data = p4.edit.T_records[r].preview;
@@ -1964,7 +1977,7 @@ function previewEdit(r)
}
else
{
flowplayer("FLASHPREVIEW", '/include/flowplayer/flowplayer-3.2.2.swf',{
flowplayer("rolloverpreview", '/include/flowplayer/flowplayer-3.2.6.swf',{
clip: {
autoPlay: true,
autoBuffering:true,
@@ -1978,7 +1991,7 @@ function previewEdit(r)
},
plugins: {
h264streaming: {
url: '/include/flowplayer/flowplayer.pseudostreaming-3.2.2.swf'
url: '/include/flowplayer/flowplayer.pseudostreaming-3.2.6.swf'
}
}
});
@@ -2000,7 +2013,22 @@ function startThisEditing(sbas_id,what,regbasprid,ssel)
p4.edit.regbasprid = regbasprid;
p4.edit.ssel = ssel;
$('#EDIT_MID_R .tabs').tabs();
$('#EDIT_MID_R .tabs').tabs(
{
select: function(event, ui)
{
var bloc = $('#EDIT_FILM2 .diapo.video_bloc .previewTips');
if($(ui.panel).attr('id') == 'TH_Opreview')
{
bloc.hide();
}
else
{
bloc.show();
}
}
}
);
$('#divS div.edit_field:odd').addClass('odd');
$('#divS div').bind('mouseover',function(){

View File

@@ -61,7 +61,7 @@ if($request->has_post_datas())
try{
$story = new basket();
$story->name = $parm['name'];
$story->desc = $parm['desc'];
$story->desc = strip_tags(str_replace('<br>',"\n",$parm['desc']));
$story->is_grouping = true;
$story->base_id = $parm['coll'];
$story->save();

View File

@@ -114,7 +114,7 @@ $right = false;
switch($type)
{
case 'video':
$embed = '<object width="100%" height="100%" type="application/x-shockwave-flash" data="'.GV_ServerName.'include/flowplayer/flowplayer-3.2.2.swf">'.
$embed = '<object width="100%" height="100%" type="application/x-shockwave-flash" data="'.GV_ServerName.'include/flowplayer/flowplayer-3.2.6.swf">'.
'<param value="true" name="allowfullscreen">'.
'<param value="always" name="allowscriptaccess">'.
'<param value="high" name="quality">'.

View File

@@ -184,12 +184,13 @@ function T_filter_delayed2(f, delay, mode)
var zurl = "/xmlhttp/search_th_term_prod.j.php"
+ "?sbid=" + sbas[i].sbid
+ "&t=" + encodeURIComponent(f);
sbas[i].seeker = $.get(
zurl,
[],
function(j, status)
{
if(status == 'success')
sbas[i].seeker = $.ajax({
url: zurl,
type:'POST',
data: [],
dataType:'json',
success: function(j)
{
var z = '#TX_P\\.' + j.parm['sbid'] + '\\.T';
@@ -200,10 +201,17 @@ function T_filter_delayed2(f, delay, mode)
if(isLast)
$(z).addClass('last');
}
},
"json"
);
error:function(){
},
timeout:function(){
}
});
}
}
else if(mode=='CANDIDATE')
@@ -219,12 +227,12 @@ function T_filter_delayed2(f, delay, mode)
zurl += "&t=" + encodeURIComponent(f)
+ "&field=" + encodeURIComponent(trees.C._selInfos.field);
}
sbas[i].seeker = $.get(
zurl,
[],
function(j, status)
{
if(status == 'success')
sbas[i].seeker = $.ajax({
url: zurl,
type:'POST',
data: [],
dataType:'json',
success: function(j)
{
var z = '#TX_P\\.' + j.parm['sbid'] + '\\.T';
@@ -235,10 +243,15 @@ function T_filter_delayed2(f, delay, mode)
if(isLast)
$(z).addClass('last');
}
},
"json"
);
error:function(){
},
timeout:function(){
}
});
}
}
},
@@ -358,6 +371,8 @@ function T_acceptCandidates_OK(dlgnode)
// $("#THPD_confirm_accept_dlg_msg").dialog("close");
},
error:function(){},
timeout:function(){},
_ret: null // private alchemy
};
@@ -878,40 +893,12 @@ function replaceEditSel(value)
return;
}
function crossBrowser_XMLHttpRequest()
{
var xmlhttp=false;
var e;
try
{
xmlhttp=new XMLHttpRequest();
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
xmlhttp=false;
}
}
}
return xmlhttp;
}
function ThesauThesaurusSeeker(sbas_id)
{
this.sbas_id = sbas_id;
this._ctimer = null;
this._xmlhttp = new crossBrowser_XMLHttpRequest();
this._xmlhttp = null;
this.tObj = { 'TH_searching':null , 'TH_P':null , 'TH_K':null };
this.search = function(txt) {
if(this._ctimer)
@@ -921,42 +908,75 @@ function ThesauThesaurusSeeker(sbas_id)
} ;
this.search_delayed = function(txt) {
var me = this;
if($this._xmlttp.abort && typeof $this._xmlttp.abort == 'function')
{
this._xmlhttp.abort();
}
var url = "/xmlhttp/openbranches_prod.x.php";
var parms = "bid=" + this.sbas_id + "&lng=<?php echo $lng?>" + "&t=" + encodeURIComponent(txt);
parms += "&mod=TREE";
this._xmlhttp.open("POST", url, true); // yes, BEFORE setting callback
this._xmlhttp.onreadystatechange = function() { me.xmlhttpstatechanged(); } ;
this._xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
this._xmlhttp.send(parms);
var parms = {
bid : this.sbas_id,
lng : "<?php echo $lng?>",
t : txt,
mod : "TREE"
};
this._xmlhttp = $.ajax({
url: url,
type:'POST',
data: parms,
success: function(ret)
{
me.xmlhttpstatechanged(ret);
},
error:function(){
},
timeout:function(){
}
});
this._ctimer = null;
} ;
this.openBranch = function(id, thid) {
var me = this;
this._xmlhttp.abort();
var url = "/xmlhttp/getterm_prod.x.php";
var parms = "bid=" + sbas_id;
parms += "&lng=<?php echo $lng?>";
parms += "&sortsy=1";
parms += "&id=" + thid;
parms += "&typ=TH";
this._xmlhttp.open("POST", url, true); // yes, BEFORE setting callback
this._xmlhttp.onreadystatechange = function() { me.xmlhttpstatechanged(id); } ;
this._xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
this._xmlhttp.send(parms);
};
this.xmlhttpstatechanged = function(id) {
try
if($this._xmlttp.abort && typeof $this._xmlttp.abort == 'function')
{
if (this._xmlhttp.readyState==4)
this._xmlhttp.abort();
}
var url = "/xmlhttp/getterm_prod.x.php";
var parms = {
bid : this.sbas_id,
lng : "<?php echo $lng?>",
sortsy : 1,
id : thid,
typ : "TH"
}
this._xmlhttp = $.ajax({
url: url,
type:'POST',
data: parms,
success: function(ret)
{
me.xmlhttpstatechanged(ret, id);
},
error:function(){
},
timeout:function(){
}
});
};
this.xmlhttpstatechanged = function(ret, id) {
try
{
if(!this.tObj["TH_searching"])
this.tObj["TH_searching"] = document.getElementById("TH_searching");
this.tObj["TH_searching"].src = "/skins/icons/ftp-loader-blank.gif";
if (this._xmlhttp.status==200)
{
var ret = this._xmlhttp.responseXML;
if(ret) // && (typeof(ret.parsed)=="undefined" || ret.parsed))
{
var htmlnodes = ret.getElementsByTagName("html");
@@ -983,8 +1003,6 @@ function ThesauThesaurusSeeker(sbas_id)
}
}
}
}
}
catch(err)
{
;