private function uploadToEBW() { include $_SERVER['DOCUMENT_ROOT'] . '/_common/includes/wms.php'; include $_SERVER['DOCUMENT_ROOT'] . '/_common/config/ftp.php'; $path = dirname(str_replace("\\", "/", $this->eventArchivePath)); $folder = basename($path); $path = dirname($path); // creates the directory on the server try { $objWMS = new WMS(); $objWMS->CreateDirectory(str_replace("/", "\\", $path), $folder); } catch (Exception $e) { } // uploads the wmv to the EBW server $ftp_conn = ftp_connect($ftp_settings['server'], $ftp_settings['port']); if (@ftp_login($ftp_conn, $ftp_settings['user'], $ftp_settings['password'])) { // changes to correct directory ftp_chdir($ftp_conn, str_replace('Z:', '', $path) . '/' . $folder); // passive mode ftp_pasv($ftp_conn, true); // upload the file $result = ftp_put($ftp_conn, '00_tribute.wmv', $this->tributePath . 'video/' . $this->randomCode . $this->videoFilename . '.wmv', FTP_BINARY); ftp_close($ftp_conn); $this->nextStep(false); return $result; } else { $this->nextStep(false); return false; } }
/** * Create Labels * * @version 1 * @author Rick de Man <*****@*****.**> * * @param string $S * Place offset for each Line * @return number|string * */ public function CreateAddLabels($S) { // File to be loaded $File = __DIR__ . '/' . $this->ClassName . '/' . $this->Template . '/labels.html'; // Validate file exists if (!file_exists($File)) { return 500; } // Load the Contents of the file $Template = file_get_contents($File); // Query Setup $Query = 'SELECT * FROM `%component_messages_labels` WHERE 1'; $Comment = 'Loading message Labels'; $Values = array($this->User['ID']); // Prepare the SQL statement $Labels = $this->SQL->Query($Query, $Comment, true); // Let the Template Builder create the content return placeOffset($S, WMS::Html_TemplateBuilder($this, $Template, $Labels)); }
/** * Return a list of all ship methods setup for this WMS * @return array */ public function ListWMSShipMethods() { return WMS::ListShipMethods($this->api_user, $this->api_key); }