clean:
-rm -rf src/.ctmp src/Makefile* src/msmoke
-rm -rf src/wob www/inc/wob doc/wob wob/core*
- -$(MAKE) -C pack clean
- -$(MAKE) -C taurus clean
- -$(MAKE) -C mainapp clean
- -$(MAKE) -C plugins clean
+ -$(MAKE) -C pack distclean
+ -$(MAKE) -C taurus distclean
+ -$(MAKE) -C mainapp distclean
+ -$(MAKE) -C plugins distclean
-rm -rf tzone/zoneinfo* tzone/libQtTzData* tzone/Makefile* tzone/.ctmp
-rm -rf doc/source-php doc/source-cpp
- -rm -rf taurus/lib/*
+ -rm -rf taurus/lib/* taurus/bin/*
-rm -rf `find . -name '*~'`
-rm -rf `find . -name '*.bak'`
-rm -rf `find . -name 'core*'`
if(showtime->isChecked())fm=showtime->data().toString();
if(showiso->isChecked())fm=showiso->data().toString();
//set it
- setText(MLocalFormat().formatDateTime(ts,fm));
+ setText(tr("Current Server Time:\n%1").arg(MLocalFormat().formatDateTime(ts,fm)));
//make sure tool tip is up to date
int off=ts.offsetFromUTC()/60;
QString tz=tr("Server Time Zone: %1\nOffset from UTC: %2 minutes %3")
<translation>%w %Y-%M-%D %h:%I %t</translation>
</message>
<message>
+ <location filename="misc/sclock.cpp" line="71"/>
+ <source>Current Server Time:
+%1</source>
+ <translation>Aktueller Theater/Server-Zeit:
+%1</translation>
+ </message>
+ <message>
<location filename="misc/sclock.cpp" line="74"/>
<source>Server Time Zone: %1
Offset from UTC: %2 minutes %3</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="misc/sclock.cpp" line="71"/>
+ <source>Current Server Time:
+%1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location filename="misc/sclock.cpp" line="74"/>
<source>Server Time Zone: %1
Offset from UTC: %2 minutes %3</source>
qApp->installTranslator(trn);
qDebug("MSInterface: successfully loaded server language %s",lang.toLatin1().data());
MLocalFormat::setDefaultFormat(gl.getformats().value());
+ m_statusbartext=gl.getstatusBarText();
}
}
///the string $APP is resolved as the directory the application is installed in
///any other component starting with $ resolves to the environment variable of the same name
static QString resolveDir(const QString&dir);
+
+ ///returns the status bar text
+ QString statusBarText()const{return m_statusbartext;}
public slots:
/**logs into the server, returns true on success*/
/// emitted when a re-login would be necessary
void needRelogin();
private:
- QString profileid,m_sessid,m_uname,m_passwd,m_host,m_hostkey;
+ QString profileid,m_sessid,m_uname,m_passwd,m_host,m_hostkey,m_statusbartext;
mutable QList<Right>userrights;
mutable QStringList userroles,userflags;
QByteArray servertranslation;
//status bar
QStatusBar *sb=statusBar();
sb->setSizeGripEnabled(true);
+ const QString sbtxt=req->statusBarText().trimmed();
+ if(!sbtxt.isEmpty()){
+ QLabel*l=new QLabel(sbtxt);
+ l->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ sb->addPermanentWidget(l);
+ }
sb->addPermanentWidget(new MServerClock);
}
<Output>
<Var name="file" type="blob">The Qt translation file to translate string from the server. All strings are found in the virtual class "::php".</Var>
<Var name="formats" type="ServerFormat">The formatting as requested by the server. Please note that the names of days and months does not necessarily correspond to the language that has been request but, to the language that the server wants to set for all printouts.</Var>
+ <Var name="statusBarText" type="string">
+ Text (plain or HTML) shown on the client's status bar.
+ </Var>
</Output>
</Transaction>
<Input/>
<Call lang="php" method="Version::serverInfoXml($this);"/>
<Output>
- <Var name="ServerVersion" type="astring"/>
- <Var name="MinimumProtocolVersion" type="astring"/>
- <Var name="ServerProtocolVersion" type="astring"/>
+ <Var name="ServerVersion" type="astring">
+ Human readable version of the server software.
+ </Var>
+ <Var name="MinimumProtocolVersion" type="astring">
+ Minimum communication protocol version that the server needs from the client.
+ </Var>
+ <Var name="ServerProtocolVersion" type="astring">
+ Protocol version that the server provides.
+ </Var>
</Output>
</Transaction>
<Call lang="php" method="MachineUser::deleteHost($this);"/>
<Output/>
</Transaction>
-</Wolf>
\ No newline at end of file
+</Wolf>
///////////
-//Development Options (comment these away in production systems)
+//Development Options (should be disabled in production systems)
+//un-comment to insert <!-- debug comments --> in XML transactions
//WobTransaction::setDebugLevel(WobTransaction::DebugAll);
+//set to true to redirect all mail to a demo account
+//set to false for production, mail goes to real recipient
+$IsDemoSystem=true;
+$DemoMailAddr="konrad@localhost";
////////////
// this should usually be a few hours (3600s per hour)
$ClientSessionTimeout=2*3600;
+//Status-Display for the client's bottom status bar
+// this can be either plain text or HTML, links are relative to machine.php
+$StatusBarText="<html><table><td><td><img src=\"data:image/png;base64,".
+"iVBORw0KGgoAAAANSUhEUgAAAFYAAAA2BAMAAACvjHOeAAAAMFBMVEUQEg8cHRsqLCn/AAA6OzlH".
+"SUZWV1VpamiAgn+Rk5CytLHFx8TW2NXp2dTn6eb9//v+e9cQAAADLUlEQVRIx73TX0hTURwH8F2J".
+"aUGws+yPhWBWYj4VF0zcBDVLjUJ9ix76p5BvNS0KLcJEsU0IUzITIjHYvP4ZlJBoOlKCatoexh5C".
+"LnuJWW7sQkHY7t1+nXPv3dTrvZtPnZcduJ+d+933d6ajt790/8uW3PGKn4X1Ka25s6xd3FgOpLKm".
+"nvuOS2RThFBvcmtudHNBhoToySzLSmpLLHtdEIq8peniVoB3w0msua1i18hc0MPS9DTgNaptTU06".
+"9wOYHvVHvbQLU17QtKbryEhOW7YCS/vx5herZc1XkWh9ft4W9Sa1pjYKoTQs1vwC7/T6lxlmJqpu".
+"zU2EdjJ+iPj5J8B+szLMyLi69SGcYCA37PDgox8Ce44kn1W3OGzu4xyc1zEL4BKqaohVz3CKMuTd".
+"KxV/G+4MdyHb5f6t1mLI7zgs9QChEQ/wkrVXNLUrbRHKf4pIYoi9xGbKKVkf2velW2mHKvsoVOnA".
+"VqDwRYDPTE2UZf0+dDm4pLDFd29TyOj5S85FenLiz/MjDPPiNbq56FLYwnLyfm5NtOkAg8AXrAJM".
+"TJbalpYV9iTabGsL+CvYOgNB1un6rWkFYusyJLviiXreq1uSF57p121gxgWsqhX6iI25E3ZshQuO".
+"R9UsypFnAXBNsm/6OeDHVC1K2NUWyd7g5kCYGUxq8d9HsuEMvE3r1bBC3kTC2hvD6fDJTWUr7dEG".
+"yUpzk3qwYzvfSh1SWOPEH9nifrsm5H7Depi3UbuVlgus29os2XLTxB5JZhNz4wACNl37NqxjiiPR".
+"dcMaNtaZl7CTF7XsR6nfWBjnzeBriK3ioNPDU6eVnZVRG+ZmFa0d2zYnT6FjjcPJ5kas87lskWGH".
+"N5X9wYFFtPtvNatY3jq3yfZJtmHPuj3bJNuIAc94lEtY/DWSoWXdZnLf41acW4bCovJ6LVu3xRoW".
+"Ulh7F75nIYHYnXQKO1QV1nMfuoltVrU6fSKvaOdFu2EWxoFHso1NMwAd1ZKtTtgLqea2wRq9KS3u".
+"QQgRiw6y7oWUFsQeEDpTli3aEzp5UXEbIfbVcdHGH0rWvBhfcRvz4Gsc+kpsLP5sidZ1bX/9Axa8".
+"4UH7XQobAAAAAElFTkSuQmCC".
+"\"></td><td>".
+"<font color=\"red\"><b>Local Development System</b></font><br/>Have fun! No productivity here.".
+"</td></tr></table>";
+
///////////
//Web-Client Configuration
<?php
-// (c) Konrad Rosenbaum, 2007-2011
+// (c) Konrad Rosenbaum, 2007-2017
// protected under the GNU AGPL version 3 or at your option any newer
// see COPYING.AGPL
class Translation
{
- static public function getFile($trans)
- {
- //split language string into components
- $nlst=explode("_",trim($trans->getlanguage()));
- //set format object
- if(count($nlst)>0)
- $trans->setformats(new WOServerFormat($nlst[0]));
- else
- $trans->setformats(new WOServerFormat());
- //if this is "C", abort parsing and return
- if(strtolower(trim($trans->getlanguage()))=="c")
- return;
- //continue to parse language request
- $form=$trans->getformat();
- if($form!="ts" && $form!="qm")
- $trans->abortWithError(translate("Translation","Format must be either 'ts' or 'qm'."));
- //does the syntax match?
- foreach($nlst as $nm)
- if(!preg_match("/^[a-zA-Z]{1,3}$/",$nm))
- $trans->abortWithError(translate("Translation","Language invalid."));
- //find the longest match for language
- for($i=count($nlst);$i>0;$i--){
- $name=implode("_",array_slice($nlst,0,$i));
- $fn="translations/_server_".$name.".".$form;
- if(file_exists($fn)){
- $trans->setfile(file_get_contents($fn,FILE_BINARY));
+ static public function getFile($trans)
+ {
+ //status bar display
+ global $StatusBarText;
+ if(isset($StatusBarText))
+ $trans->setStatusBarText($StatusBarText);
+
+ //split language string into components
+ $nlst=explode("_",trim($trans->getlanguage()));
+ //set format object
+ if(count($nlst)>0)
+ $trans->setformats(new WOServerFormat($nlst[0]));
+ else
+ $trans->setformats(new WOServerFormat());
+ //if this is "C", abort parsing and return
+ if(strtolower(trim($trans->getlanguage()))=="c")
return;
+ //continue to parse language request
+ $form=$trans->getformat();
+ if($form!="ts" && $form!="qm")
+ $trans->abortWithError(translate("Translation","Format must be either 'ts' or 'qm'."));
+ //does the syntax match?
+ foreach($nlst as $nm)
+ if(!preg_match("/^[a-zA-Z]{1,3}$/",$nm))
+ $trans->abortWithError(translate("Translation","Language invalid."));
+ //find the longest match for language
+ for($i=count($nlst);$i>0;$i--){
+ $name=implode("_",array_slice($nlst,0,$i));
+ $fn="translations/_server_".$name.".".$form;
+ if(file_exists($fn)){
+ $trans->setfile(file_get_contents($fn,FILE_BINARY));
+ return;
+ }
}
+
+ //none found. sadly.
+ $trans->abortWithError(translate("Translation","Language unknown."));
}
- //none found. sadly.
- $trans->abortWithError(translate("Translation","Language unknown."));
- }
};
//eof
}
}
//send mail
- mail($ct->email,$subject,$mailtext,$mailheader);
+ global $IsDemoSystem,$DemoMailAddr;
+ if(isset($IsDemoSystem) && $IsDemoSystem==true && isset($DemoMailAddr))
+ $tmail=$DemoMailAddr;
+ else
+ $tmail=$ct->email;
+ mail($tmail,$subject,$mailtext,$mailheader);
}
/**page shown to the customer after clicking the password reset link above*/
if(!isEmail($ct->email)){
return;
}
- //set reset parameters
- global $MailFrom;
//init twig
BaseVars::initTwig();
BaseVars::init();
//gather basics and render mail
+ global $IsDemoSystem,$DemoMailAddr;
global $twig,$basevars;
$p=$twig->loadTemplate("ordermail.txt");
$list['customer']=WOCustomer::fromTablecustomer($ct);
}
}
//send mail
- mail($ct->email,$subject,$mailtext,$mailheader);
+ if(isset($IsDemoSystem) && $IsDemoSystem==true && isset($DemoMailAddr))
+ $tmail=$DemoMailAddr;
+ else
+ $tmail=$ct->email;
+ mail($tmail,$subject,$mailtext,$mailheader);
}
///change the addresses on the order, called by ChangeOrderAddress transaction