mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 23:55:56 +01:00
2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Update web test methods in 'web/tests/'. * Added an 'RDSchedCode' class in 'lib/rdschedcode.cpp' and 'lib/rdschedcode.h'. * Implemented the 'ListSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'AssignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'UnassignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'ListCartSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Extended 'RDGetWebTime()' and 'RDGetWebDateTime()' functions to support XML 'xs' namespace formats. * Implemented '*_POINT' fields in the 'EditCut' web method in 'web/rdxport/carts.cpp'. * Modified the 'RDCart::removeSchedCode()' method so as to treat scheduler codes in a case-insensitve manner. * Modified the return of the 'EditCut' web method to provide a full <cutList> record in 'web/rdxport/carts.cpp'.
This commit is contained in:
@@ -41,6 +41,7 @@ dist_rdxport_cgi_SOURCES = audioinfo.cpp\
|
||||
import.cpp\
|
||||
logs.cpp\
|
||||
rdxport.cpp rdxport.h\
|
||||
schedcodes.cpp\
|
||||
services.cpp\
|
||||
trimaudio.cpp
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
//
|
||||
// Rivendell web service portal -- Cart services
|
||||
//
|
||||
// (C) Copyright 2010 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// $Id: carts.cpp,v 1.8.2.2.2.1 2014/03/19 22:13:01 cvs Exp $
|
||||
// (C) Copyright 2010-2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -591,6 +589,29 @@ void Xport::EditCut()
|
||||
QTime time;
|
||||
bool rotation_changed=false;
|
||||
bool length_changed=false;
|
||||
QDateTime start_datetime;
|
||||
bool use_start_datetime=false;
|
||||
QDateTime end_datetime;
|
||||
bool use_end_datetime=false;
|
||||
QTime start_daypart;
|
||||
bool use_start_daypart=false;
|
||||
QTime end_daypart;
|
||||
bool use_end_daypart=false;
|
||||
int talk_points[2];
|
||||
bool use_end_points[2]={false,false};
|
||||
int end_points[2];
|
||||
bool use_talk_points[2]={false,false};
|
||||
int segue_points[2];
|
||||
bool use_segue_points[2]={false,false};
|
||||
int hook_points[2];
|
||||
bool use_hook_points[2]={false,false};
|
||||
int fadeup_point;
|
||||
bool use_fadeup_point=false;
|
||||
int fadedown_point;
|
||||
bool use_fadedown_point=false;
|
||||
bool use_weight=false;
|
||||
int weight;
|
||||
bool ok=false;
|
||||
|
||||
//
|
||||
// Verify Post
|
||||
@@ -613,13 +634,95 @@ void Xport::EditCut()
|
||||
}
|
||||
|
||||
//
|
||||
// Process Request
|
||||
// Check Date/Time Values for Validity
|
||||
//
|
||||
if((use_start_datetime=xport_post->
|
||||
getValue("START_DATETIME",&start_datetime,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid START_DATETIME",400);
|
||||
}
|
||||
}
|
||||
if((use_end_datetime=xport_post->
|
||||
getValue("END_DATETIME",&end_datetime,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid END_DATETIME",400);
|
||||
}
|
||||
}
|
||||
if(use_start_datetime!=use_end_datetime) {
|
||||
XmlExit("both DATETIME values must be set together",400);
|
||||
}
|
||||
if(use_start_datetime&&(start_datetime>end_datetime)) {
|
||||
XmlExit("START_DATETIME is later than END_DATETIME",400);
|
||||
}
|
||||
|
||||
if((use_start_daypart=xport_post->
|
||||
getValue("START_DAYPART",&start_daypart,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid START_DAYPART",400);
|
||||
}
|
||||
}
|
||||
if((use_end_daypart=xport_post->
|
||||
getValue("END_DAYPART",&end_daypart,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid END_DAYPART",400);
|
||||
}
|
||||
}
|
||||
if(use_start_daypart!=use_end_daypart) {
|
||||
XmlExit("both DAYPART values must be set together",400);
|
||||
}
|
||||
|
||||
cut=new RDCut(cart_number,cut_number);
|
||||
if(!cut->exists()) {
|
||||
delete cut;
|
||||
XmlExit("No such cut",404);
|
||||
}
|
||||
|
||||
//
|
||||
// Check pointers for validity
|
||||
//
|
||||
end_points[0]=cut->startPoint();
|
||||
end_points[1]=cut->endPoint();
|
||||
fadeup_point=cut->fadeupPoint();
|
||||
fadedown_point=cut->fadedownPoint();
|
||||
CheckPointerValidity(end_points,use_end_points,"",0);
|
||||
CheckPointerValidity(talk_points,use_talk_points,"TALK_",end_points[1]);
|
||||
CheckPointerValidity(segue_points,use_segue_points,"SEGUE_",end_points[1]);
|
||||
CheckPointerValidity(hook_points,use_hook_points,"HOOK_",end_points[1]);
|
||||
if((use_fadeup_point=xport_post->
|
||||
getValue("FADEUP_POINT",&fadeup_point,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid FADEUP_POINT",400);
|
||||
}
|
||||
if(fadeup_point>end_points[1]) {
|
||||
XmlExit("FADEUP_POINT exceeds length of cart",400);
|
||||
}
|
||||
}
|
||||
if((use_fadedown_point=xport_post->
|
||||
getValue("FADEDOWN_POINT",&fadedown_point,&ok))) {
|
||||
if(!ok) {
|
||||
XmlExit("invalid FADEDOWN_POINT",400);
|
||||
}
|
||||
if(fadeup_point>end_points[1]) {
|
||||
XmlExit("FADEDOWN_POINT exceeds length of cart",400);
|
||||
}
|
||||
}
|
||||
if(use_fadeup_point&&use_fadedown_point&&
|
||||
(fadeup_point>=0)&&(fadedown_point>=0)&&(fadeup_point>fadedown_point)) {
|
||||
XmlExit("FADEUP_POINT is greater than FADEDOWN_POINT",400);
|
||||
}
|
||||
|
||||
//
|
||||
// Check Weight
|
||||
//
|
||||
if((use_weight=xport_post->getValue("WEIGHT",&weight,&ok))) {
|
||||
if((!ok)||(weight<0)) {
|
||||
XmlExit("invalid WEIGHT",400);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Process Request
|
||||
//
|
||||
if(xport_post->getValue("EVERGREEN",&num)) {
|
||||
cut->setEvergreen(num);
|
||||
rotation_changed=true;
|
||||
@@ -636,13 +739,13 @@ void Xport::EditCut()
|
||||
if(xport_post->getValue("ISCI",&str)) {
|
||||
cut->setIsci(str);
|
||||
}
|
||||
if(xport_post->getValue("START_DATETIME",&datetime)) {
|
||||
cut->setStartDatetime(datetime,!datetime.isNull());
|
||||
if(use_start_datetime) {
|
||||
cut->setStartDatetime(start_datetime,!start_datetime.isNull());
|
||||
length_changed=true;
|
||||
rotation_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("END_DATETIME",&datetime)) {
|
||||
cut->setEndDatetime(datetime,!datetime.isNull());
|
||||
if(use_end_datetime) {
|
||||
cut->setEndDatetime(end_datetime,!end_datetime.isNull());
|
||||
length_changed=true;
|
||||
rotation_changed=true;
|
||||
}
|
||||
@@ -674,56 +777,56 @@ void Xport::EditCut()
|
||||
cut->setWeekPart(7,num);
|
||||
rotation_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("START_DAYPART",&time)) {
|
||||
cut->setStartDaypart(time,!time.isNull());
|
||||
if(use_start_daypart) {
|
||||
cut->setStartDaypart(start_daypart,!start_daypart.isNull());
|
||||
rotation_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("END_DAYPART",&time)) {
|
||||
cut->setEndDaypart(time,!time.isNull());
|
||||
if(use_end_daypart) {
|
||||
cut->setEndDaypart(end_daypart,!end_daypart.isNull());
|
||||
rotation_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("WEIGHT",&num)) {
|
||||
cut->setWeight(num);
|
||||
if(use_weight) {
|
||||
cut->setWeight(weight);
|
||||
rotation_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("START_POINT",&num)) {
|
||||
cut->setStartPoint(num);
|
||||
if(use_end_points[0]) {
|
||||
cut->setStartPoint(end_points[0]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("END_POINT",&num)) {
|
||||
cut->setEndPoint(num);
|
||||
if(use_end_points[1]) {
|
||||
cut->setEndPoint(end_points[1]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("FADEUP_POINT",&num)) {
|
||||
cut->setFadeupPoint(num);
|
||||
if(use_fadeup_point) {
|
||||
cut->setFadeupPoint(fadeup_point);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("FADEDOWN_POINT",&num)) {
|
||||
cut->setFadedownPoint(num);
|
||||
if(use_fadedown_point) {
|
||||
cut->setFadedownPoint(fadedown_point);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("SEGUE_START_POINT",&num)) {
|
||||
cut->setSegueStartPoint(num);
|
||||
if(use_segue_points[0]) {
|
||||
cut->setSegueStartPoint(segue_points[0]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("SEGUE_END_POINT",&num)) {
|
||||
cut->setSegueEndPoint(num);
|
||||
if(use_segue_points[1]) {
|
||||
cut->setSegueEndPoint(segue_points[1]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("HOOK_START_POINT",&num)) {
|
||||
cut->setHookStartPoint(num);
|
||||
if(use_hook_points[0]) {
|
||||
cut->setHookStartPoint(hook_points[0]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("HOOK_END_POINT",&num)) {
|
||||
cut->setHookEndPoint(num);
|
||||
if(use_hook_points[1]) {
|
||||
cut->setHookEndPoint(hook_points[1]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("TALK_START_POINT",&num)) {
|
||||
cut->setTalkStartPoint(num);
|
||||
if(use_talk_points[0]) {
|
||||
cut->setTalkStartPoint(talk_points[0]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(xport_post->getValue("TALK_END_POINT",&num)) {
|
||||
cut->setTalkEndPoint(num);
|
||||
if(use_talk_points[1]) {
|
||||
cut->setTalkEndPoint(talk_points[1]);
|
||||
length_changed=true;
|
||||
}
|
||||
if(length_changed||rotation_changed) {
|
||||
@@ -736,8 +839,61 @@ void Xport::EditCut()
|
||||
}
|
||||
delete cart;
|
||||
}
|
||||
printf("Content-type: application/xml\n");
|
||||
printf("Status: 200\n\n");
|
||||
printf("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
|
||||
printf("<cutList>\n");
|
||||
printf("%s",(const char *)cut->xml());
|
||||
printf("</cutList>\n");
|
||||
delete cut;
|
||||
XmlExit("OK",200);
|
||||
|
||||
Exit(0);
|
||||
}
|
||||
|
||||
|
||||
void Xport::CheckPointerValidity(int ptr_values[2],bool use_ptrs[2],
|
||||
const QString &type,unsigned max_value)
|
||||
{
|
||||
bool start_ok=false;
|
||||
bool end_ok=false;
|
||||
|
||||
use_ptrs[0]=xport_post->getValue(type+"START_POINT",&ptr_values[0],&start_ok);
|
||||
use_ptrs[1]=xport_post->getValue(type+"END_POINT",&ptr_values[1],&end_ok);
|
||||
if((!use_ptrs[0])&&(!use_ptrs[1])) {
|
||||
return;
|
||||
}
|
||||
if(!start_ok) {
|
||||
XmlExit("invalid "+type+"START_POINT",400);
|
||||
}
|
||||
if(!end_ok) {
|
||||
XmlExit("invalid "+type+"END_POINT",400);
|
||||
}
|
||||
if(use_ptrs[0]!=use_ptrs[1]) {
|
||||
XmlExit("both "+type+"*_POINT values must be set together",400);
|
||||
}
|
||||
if(use_ptrs[0]) {
|
||||
if(((ptr_values[0]<0)&&(ptr_values[1]>=0))||
|
||||
((ptr_values[0]>=0)&&(ptr_values[1]<0))) {
|
||||
XmlExit("inconsistent "+type+"*_POINT values",400);
|
||||
}
|
||||
}
|
||||
if(ptr_values[0]>=0) {
|
||||
if(ptr_values[0]>ptr_values[1]) {
|
||||
XmlExit(type+"START_POINT greater than "+type+"END_POINT",400);
|
||||
}
|
||||
if((max_value>0)&&((unsigned)ptr_values[1]>max_value)) {
|
||||
XmlExit(type+"END_POINT exceeds length of cut",400);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(max_value==0) {
|
||||
XmlExit("End markers cannot be removed",400);
|
||||
}
|
||||
else {
|
||||
ptr_values[0]=-1;
|
||||
ptr_values[1]=-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -231,6 +231,22 @@ Xport::Xport(QObject *parent,const char *name)
|
||||
ListLog();
|
||||
break;
|
||||
|
||||
case RDXPORT_COMMAND_LISTSCHEDCODES:
|
||||
ListSchedCodes();
|
||||
break;
|
||||
|
||||
case RDXPORT_COMMAND_ASSIGNSCHEDCODE:
|
||||
AssignSchedCode();
|
||||
break;
|
||||
|
||||
case RDXPORT_COMMAND_UNASSIGNSCHEDCODE:
|
||||
UnassignSchedCode();
|
||||
break;
|
||||
|
||||
case RDXPORT_COMMAND_LISTCARTSCHEDCODES:
|
||||
ListCartSchedCodes();
|
||||
break;
|
||||
|
||||
case RDXPORT_COMMAND_LISTSERVICES:
|
||||
ListServices();
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#include <rdaudioconvert.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rdformpost.h>
|
||||
#include <rduser.h>
|
||||
#include <rdsystem.h>
|
||||
|
||||
@@ -47,6 +49,8 @@ class Xport : public QObject
|
||||
void ListCuts();
|
||||
void ListCut();
|
||||
void EditCut();
|
||||
void CheckPointerValidity(int ptr_values[2],bool use_ptrs[2],
|
||||
const QString &type,unsigned max_value);
|
||||
void RemoveCut();
|
||||
void ListGroups();
|
||||
void ListGroup();
|
||||
@@ -57,6 +61,10 @@ class Xport : public QObject
|
||||
void AudioStore();
|
||||
void ListLogs();
|
||||
void ListLog();
|
||||
void ListSchedCodes();
|
||||
void AssignSchedCode();
|
||||
void UnassignSchedCode();
|
||||
void ListCartSchedCodes();
|
||||
void ListServices();
|
||||
void Exit(int code);
|
||||
void XmlExit(const QString &str,int code,
|
||||
|
||||
185
web/rdxport/schedcodes.cpp
Normal file
185
web/rdxport/schedcodes.cpp
Normal file
@@ -0,0 +1,185 @@
|
||||
// schedcodes.h
|
||||
//
|
||||
// Rivendell web service portal
|
||||
//
|
||||
// (C) Copyright 2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include "rdcart.h"
|
||||
#include "rddb.h"
|
||||
#include "rdschedcode.h"
|
||||
#include "rdxport.h"
|
||||
|
||||
void Xport::ListSchedCodes()
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
RDSchedCode *schedcode;
|
||||
|
||||
//
|
||||
// Generate Scheduler Code List
|
||||
//
|
||||
sql=QString("select CODE from SCHED_CODES order by CODE");
|
||||
q=new RDSqlQuery(sql);
|
||||
|
||||
//
|
||||
// Process Request
|
||||
//
|
||||
printf("Content-type: application/xml\n");
|
||||
printf("Status: 200\n\n");
|
||||
printf("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
|
||||
printf("<schedCodeList>\n");
|
||||
while(q->next()) {
|
||||
schedcode=new RDSchedCode(q->value(0).toString());
|
||||
printf("%s",(const char *)schedcode->xml().utf8());
|
||||
delete schedcode;
|
||||
}
|
||||
printf("</schedCodeList>\n");
|
||||
|
||||
delete q;
|
||||
Exit(0);
|
||||
}
|
||||
|
||||
|
||||
void Xport::AssignSchedCode()
|
||||
{
|
||||
int cart_number;
|
||||
QString sched_code;
|
||||
QStringList codes;
|
||||
RDCart *cart=NULL;
|
||||
RDSchedCode *code;
|
||||
|
||||
//
|
||||
// Verify Post
|
||||
//
|
||||
if(!xport_post->getValue("CART_NUMBER",&cart_number)) {
|
||||
XmlExit("Missing CART_NUMBER",400);
|
||||
}
|
||||
if(!xport_post->getValue("CODE",&sched_code)) {
|
||||
XmlExit("Missing CODE",400);
|
||||
}
|
||||
|
||||
//
|
||||
// Verify User Perms
|
||||
//
|
||||
if(!xport_user->cartAuthorized(cart_number)) {
|
||||
XmlExit("No such cart",404);
|
||||
}
|
||||
|
||||
//
|
||||
// Process Request
|
||||
//
|
||||
cart=new RDCart(cart_number);
|
||||
code=new RDSchedCode(sched_code);
|
||||
if(!code->exists()) {
|
||||
XmlExit("No such scheduler code",404);
|
||||
}
|
||||
codes=cart->schedCodesList();
|
||||
for(unsigned i=0;i<codes.size();i++) {
|
||||
if(codes[i]==sched_code) {
|
||||
delete cart;
|
||||
XmlExit("OK",200);
|
||||
}
|
||||
}
|
||||
cart->addSchedCode(sched_code);
|
||||
XmlExit("OK",200);
|
||||
}
|
||||
|
||||
|
||||
void Xport::UnassignSchedCode()
|
||||
{
|
||||
int cart_number;
|
||||
QString sched_code;
|
||||
QStringList codes;
|
||||
RDCart *cart=NULL;
|
||||
RDSchedCode *code;
|
||||
|
||||
//
|
||||
// Verify Post
|
||||
//
|
||||
if(!xport_post->getValue("CART_NUMBER",&cart_number)) {
|
||||
XmlExit("Missing CART_NUMBER",400);
|
||||
}
|
||||
if(!xport_post->getValue("CODE",&sched_code)) {
|
||||
XmlExit("Missing CODE",400);
|
||||
}
|
||||
|
||||
//
|
||||
// Verify User Perms
|
||||
//
|
||||
if(!xport_user->cartAuthorized(cart_number)) {
|
||||
XmlExit("No such cart",404);
|
||||
}
|
||||
|
||||
//
|
||||
// Process Request
|
||||
//
|
||||
cart=new RDCart(cart_number);
|
||||
code=new RDSchedCode(sched_code);
|
||||
if(!code->exists()) {
|
||||
XmlExit("No such scheduler code",404);
|
||||
}
|
||||
cart->removeSchedCode(sched_code);
|
||||
delete cart;
|
||||
delete code;
|
||||
XmlExit("OK",200);
|
||||
}
|
||||
|
||||
|
||||
void Xport::ListCartSchedCodes()
|
||||
{
|
||||
int cart_number;
|
||||
RDCart *cart;
|
||||
QStringList codes;
|
||||
RDSchedCode *schedcode;
|
||||
|
||||
//
|
||||
// Verify Post
|
||||
//
|
||||
if(!xport_post->getValue("CART_NUMBER",&cart_number)) {
|
||||
XmlExit("Missing CART_NUMBER",400);
|
||||
}
|
||||
|
||||
//
|
||||
// Verify User Perms
|
||||
//
|
||||
if(!xport_user->cartAuthorized(cart_number)) {
|
||||
XmlExit("No such cart",404);
|
||||
}
|
||||
//
|
||||
// Generate Scheduler Code List
|
||||
//
|
||||
cart=new RDCart(cart_number);
|
||||
codes=cart->schedCodesList();
|
||||
|
||||
//
|
||||
// Process Request
|
||||
//
|
||||
printf("Content-type: application/xml\n");
|
||||
printf("Status: 200\n\n");
|
||||
printf("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
|
||||
printf("<schedCodeList>\n");
|
||||
for(unsigned i=0;i<codes.size();i++) {
|
||||
schedcode=new RDSchedCode(codes[i]);
|
||||
printf("%s",(const char *)schedcode->xml().utf8());
|
||||
delete schedcode;
|
||||
}
|
||||
printf("</schedCodeList>\n");
|
||||
|
||||
Exit(0);
|
||||
}
|
||||
@@ -2,9 +2,7 @@
|
||||
##
|
||||
## Automake.am for rivendell/web/tests
|
||||
##
|
||||
## (C) Copyright 2010,2013 Fred Gleason <fredg@paravelsystems.com>
|
||||
##
|
||||
## $Id: Makefile.am,v 1.6.6.4 2013/10/14 04:23:55 cvs Exp $
|
||||
## (C) Copyright 2010,2013-2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License version 2 as
|
||||
@@ -25,76 +23,97 @@ install-exec-am:
|
||||
mkdir -p $(DESTDIR)@libexecdir@
|
||||
cp addcart.html $(DESTDIR)@libexecdir@
|
||||
cp addcut.html $(DESTDIR)@libexecdir@
|
||||
cp assignschedcode.html $(DESTDIR)@libexecdir@
|
||||
cp audioinfo.html $(DESTDIR)@libexecdir@
|
||||
cp audiostore.html $(DESTDIR)@libexecdir@
|
||||
cp copyaudio.html $(DESTDIR)@libexecdir@
|
||||
cp delete_audio.html $(DESTDIR)@libexecdir@
|
||||
cp editcart.html $(DESTDIR)@libexecdir@
|
||||
cp editcut.js $(DESTDIR)@libexecdir@
|
||||
cp editcut.html $(DESTDIR)@libexecdir@
|
||||
cp editcart.js $(DESTDIR)@libexecdir@
|
||||
cp export.html $(DESTDIR)@libexecdir@
|
||||
cp exportpeaks.html $(DESTDIR)@libexecdir@
|
||||
cp import.html $(DESTDIR)@libexecdir@
|
||||
cp import.html $(DESTDIR)@libexecdir@
|
||||
cp listcart.html $(DESTDIR)@libexecdir@
|
||||
cp listcarts.html $(DESTDIR)@libexecdir@
|
||||
cp listcartschedcodes.html $(DESTDIR)@libexecdir@
|
||||
cp listcut.html $(DESTDIR)@libexecdir@
|
||||
cp listcuts.html $(DESTDIR)@libexecdir@
|
||||
cp listgroup.html $(DESTDIR)@libexecdir@
|
||||
cp listgroups.html $(DESTDIR)@libexecdir@
|
||||
cp listlog.html $(DESTDIR)@libexecdir@
|
||||
cp listlogs.html $(DESTDIR)@libexecdir@
|
||||
cp listschedcodes.html $(DESTDIR)@libexecdir@
|
||||
cp listservices.html $(DESTDIR)@libexecdir@
|
||||
cp removecart.html $(DESTDIR)@libexecdir@
|
||||
cp removecut.html $(DESTDIR)@libexecdir@
|
||||
cp trimaudio.html $(DESTDIR)@libexecdir@
|
||||
cp unassignschedcode.html $(DESTDIR)@libexecdir@
|
||||
cp utils.js $(DESTDIR)@libexecdir@
|
||||
|
||||
uninstall:
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)@libexecdir@/addcart.html
|
||||
rm -f $(DESTDIR)@libexecdir@/addcut.html
|
||||
rm -f $(DESTDIR)@libexecdir@/assignschedcode.html
|
||||
rm -f $(DESTDIR)@libexecdir@/audioinfo.html
|
||||
rm -f $(DESTDIR)@libexecdir@/audiostore.html
|
||||
rm -f $(DESTDIR)@libexecdir@/copyaudio.html
|
||||
rm -f $(DESTDIR)@libexecdir@/delete_audio.html
|
||||
rm -f $(DESTDIR)@libexecdir@/editcart.html
|
||||
rm -f $(DESTDIR)@libexecdir@/editcart.js
|
||||
rm -f $(DESTDIR)@libexecdir@/editcut.html
|
||||
rm -f $(DESTDIR)@libexecdir@/editcut.js
|
||||
rm -f $(DESTDIR)@libexecdir@/export.html
|
||||
rm -f $(DESTDIR)@libexecdir@/exportpeaks.html
|
||||
rm -f $(DESTDIR)@libexecdir@/import.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listcart.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listcarts.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listcartschedcodes.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listcut.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listcuts.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listgroup.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listgroups.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listlog.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listlogs.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listschedcodes.html
|
||||
rm -f $(DESTDIR)@libexecdir@/listservices.html
|
||||
rm -f $(DESTDIR)@libexecdir@/removecart.html
|
||||
rm -f $(DESTDIR)@libexecdir@/removecut.html
|
||||
rm -f $(DESTDIR)@libexecdir@/trimaudio.html
|
||||
rm -f $(DESTDIR)@libexecdir@/unassignschedcode.html
|
||||
rm -f $(DESTDIR)@libexecdir@/utils.js
|
||||
|
||||
EXTRA_DIST = addcart.html\
|
||||
addcut.html\
|
||||
assignschedcode.html\
|
||||
audioinfo.html\
|
||||
audiostore.html\
|
||||
copyaudio.html\
|
||||
delete_audio.html\
|
||||
editcart.html\
|
||||
editcart.js\
|
||||
editcut.html\
|
||||
editcut.js\
|
||||
export.html\
|
||||
exportpeaks.html\
|
||||
import.html\
|
||||
listcart.html\
|
||||
listcarts.html\
|
||||
listcartschedcodes.html\
|
||||
listcut.html\
|
||||
listcuts.html\
|
||||
listgroup.html\
|
||||
listgroups.html\
|
||||
listlog.html\
|
||||
listlogs.html\
|
||||
listschedcodes.html\
|
||||
listservices.html\
|
||||
removecart.html\
|
||||
removecut.html\
|
||||
trimaudio.html\
|
||||
unassignschedcode.html\
|
||||
utils.js
|
||||
|
||||
CLEANFILES = *~
|
||||
|
||||
33
web/tests/assignschedcode.html
Normal file
33
web/tests/assignschedcode.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell ASSIGNSCHEDCODE Service Test Harness</title>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="25">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" size="20" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" size="20" maxlength="32"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CART NUMBER:</td>
|
||||
<td><input type="text" name="CART_NUMBER" size="8" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CODE:</td>
|
||||
<td><input type="text" name="CODE" size="12" maxlength="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="OK"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +1,159 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell EDITCART Service Test Harness</title>
|
||||
<script type="text/javascript" src="editcart.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="14">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" size="20" maxlength="255"></td>
|
||||
<td><input type="text" name="LOGIN_NAME" id="LOGIN_NAME" size="64" maxlength="255"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" size="20" maxlength="32"></td>
|
||||
<td><input type="password" name="PASSWORD" id="PASSWORD" size="64" maxlength="32"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CART NUMBER:</td>
|
||||
<td><input type="text" name="CART_NUMBER" size="20" maxlength="255"></td>
|
||||
<td><input type="text" name="CART_NUMBER" id="CART_NUMBER" size="64" maxlength="255"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">INCLUDE CUTS:</td>
|
||||
<td><input type="text" name="INCLUDE_CUTS" size="2" maxlength="1"></td>
|
||||
<td><input type="text" name="INCLUDE_CUTS" id="INCLUDE_CUTS" size="2" maxlength="1"></td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">ASYNCHRONOUS:</td>
|
||||
<td><input type="text" name="ASYNCHRONOUS" id="ASYNCHRONOUS" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_ASYNCHRONOUS"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">ENFORCE_LENGTH:</td>
|
||||
<td><input type="text" name="ENFORCE_LENGTH" id="ENFORCE_LENGTH" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_ENFORCE_LENGTH"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">FORCED_LENGTH:</td>
|
||||
<td><input type="text" name="FORCEE_LENGTH" id="FORCED_LENGTH" size="7" maxlength="7"></td>
|
||||
<td><input type="checkbox" id="USE_FORCED_LENGTH"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td align="right">GROUP NAME:</td>
|
||||
<td><input type="text" name="GROUP_NAME" size="20" maxlength="20"></td>
|
||||
<td><input type="text" name="GROUP_NAME" id="GROUP_NAME" size="64" maxlength="20"></td>
|
||||
<td><input type="checkbox" id="USE_GROUP_NAME"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td align="right">TITLE:</td>
|
||||
<td><input type="text" name="TITLE" size="20" maxlength="255"></td>
|
||||
<td><input type="text" name="TITLE" id="TITLE" size="64" maxlength="255"></td>
|
||||
<td><input type="checkbox" id="USE_TITLE"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
<td align="right">ARTIST:</td>
|
||||
<td><input type="text" name="ARTIST" id="ARTIST" size="64" maxlength="255"></td>
|
||||
<td><input type="checkbox" id="USE_ARTIST"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="OK"></td>
|
||||
<td align="right">YEAR:</td>
|
||||
<td><input type="text" name="YEAR" id="YEAR" size="8" maxlength="4"></td>
|
||||
<td><input type="checkbox" id="USE_YEAR"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SONG ID:</td>
|
||||
<td><input type="text" name="SONG_ID" id="SONG_ID" size="64" maxlength="32"></td>
|
||||
<td><input type="checkbox" id="USE_SONG_ID"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">ALBUM:</td>
|
||||
<td><input type="text" name="ALBUM" id="ALBUM" size="64" maxlength="255"></td>
|
||||
<td><input type="checkbox" id="USE_ALBUM"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">LABEL:</td>
|
||||
<td><input type="text" name="LABEL" id="LABEL" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_LABEL"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CLIENT:</td>
|
||||
<td><input type="text" name="CLIENT" id="CLIENT" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_CLIENT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">AGENCY:</td>
|
||||
<td><input type="text" name="AGENCY" id="AGENCY" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_AGENCY"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PUBLISHER:</td>
|
||||
<td><input type="text" name="PUBLISHER" id="PUBLISHER" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_PUBLISHER"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">COMPOSER:</td>
|
||||
<td><input type="text" name="COMPOSER" id="COMPOSER" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_COMPOSER"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CONDUCTOR:</td>
|
||||
<td><input type="text" name="CONDUCTOR" id="CONDUCTOR" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_CONDUCTOR"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">USER_DEFINED:</td>
|
||||
<td><input type="text" name="USER_DEFINED" id="USER_DEFINED" size="64" maxlength="255"></td>
|
||||
<td><input type="checkbox" id="USE_USER_DEFINED"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">OWNER:</td>
|
||||
<td><input type="text" name="OWNER" id="OWNER" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_OWNER"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top">NOTES:</td>
|
||||
<td><textarea name="NOTES" id="NOTES" cols="64" rows="4"></textarea></td>
|
||||
<td><input type="checkbox" id="USE_NOTES"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td align="left"><input type="button" onclick="EditCart_Submit();" value="OK"></td>
|
||||
<td align="right"><input type="button" onclick="EditCart_ShowPost();" value="Show POST"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
73
web/tests/editcart.js
Normal file
73
web/tests/editcart.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// editcart.js
|
||||
//
|
||||
// Script for selecting cart label elements for the EditCart web method
|
||||
//
|
||||
// (C) Copyright 2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
function EditCart_Field(field)
|
||||
{
|
||||
if(document.getElementById("USE_"+field).checked) {
|
||||
return '&'+field+'='+UrlEncode(document.getElementById(field).value);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function EditCart_MakePost()
|
||||
{
|
||||
var form='COMMAND=14';
|
||||
form+='&LOGIN_NAME='+document.getElementById("LOGIN_NAME").value;
|
||||
form+='&PASSWORD='+document.getElementById("PASSWORD").value;
|
||||
form+='&CART_NUMBER='+document.getElementById("CART_NUMBER").value;
|
||||
if(document.getElementById("INCLUDE_CUTS").value.length==0) {
|
||||
form+="&INCLUDE_CUTS=0";
|
||||
}
|
||||
else {
|
||||
form+="&INCLUDE_CUTS="+document.getElementById("INCLUDE_CUTS").value;
|
||||
}
|
||||
form+=EditCart_Field("ASYNCHRONOUS");
|
||||
form+=EditCart_Field("ENFORCE_LENGTH");
|
||||
form+=EditCart_Field("FORCED_LENGTH");
|
||||
form+=EditCart_Field("GROUP_NAME");
|
||||
form+=EditCart_Field("TITLE");
|
||||
form+=EditCart_Field("ARTIST");
|
||||
form+=EditCart_Field("YEAR");
|
||||
form+=EditCart_Field("SONG_ID");
|
||||
form+=EditCart_Field("ALBUM");
|
||||
form+=EditCart_Field("LABEL");
|
||||
form+=EditCart_Field("CLIENT");
|
||||
form+=EditCart_Field("AGENCY");
|
||||
form+=EditCart_Field("PUBLISHER");
|
||||
form+=EditCart_Field("COMPOSER");
|
||||
form+=EditCart_Field("CONDUCTOR");
|
||||
form+=EditCart_Field("USER_DEFINED");
|
||||
form+=EditCart_Field("OWNER");
|
||||
form+=EditCart_Field("NOTES");
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
function EditCart_ShowPost()
|
||||
{
|
||||
alert('form: '+EditCart_MakePost());
|
||||
}
|
||||
|
||||
|
||||
function EditCart_Submit()
|
||||
{
|
||||
PostForm(EditCart_MakePost(),"http://localhost/rd-bin/rdxport.cgi");
|
||||
}
|
||||
217
web/tests/editcut.html
Normal file
217
web/tests/editcut.html
Normal file
@@ -0,0 +1,217 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell EDITCUT Service Test Harness</title>
|
||||
<script type="text/javascript" src="editcut.js"></script>
|
||||
<script type="text/javascript" src="utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="15">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" id="LOGIN_NAME" size="64" maxlength="255"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" id="PASSWORD" size="64" maxlength="32"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CART NUMBER:</td>
|
||||
<td><input type="text" name="CART_NUMBER" id="CART_NUMBER" size="8" maxlength="6"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CUT NUMBER:</td>
|
||||
<td><input type="text" name="CUT_NUMBER" id="CUT_NUMBER" size="8" maxlength="3"></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
<td align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">EVERGREEN:</td>
|
||||
<td><input type="text" name="EVERGREEN" id="EVERGREEN" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_EVERGREEN"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">DESCRIPTION:</td>
|
||||
<td><input type="text" name="DESCRIPTION" id="DESCRIPTION" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_DESCRIPTION"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">OUTCUE:</td>
|
||||
<td><input type="text" name="OUTCUE" id="OUTCUE" size="64" maxlength="64"></td>
|
||||
<td><input type="checkbox" id="USE_OUTCUE"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">ISRC:</td>
|
||||
<td><input type="text" name="ISRC" id="ISRC" size="16" maxlength="12"></td>
|
||||
<td><input type="checkbox" id="USE_ISRC"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">ISCI:</td>
|
||||
<td><input type="text" name="ISCI" id="ISCI" size="40" maxlength="32"></td>
|
||||
<td><input type="checkbox" id="USE_ISCI"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">START_DATETIME:</td>
|
||||
<td><input type="text" name="START_DATETIME" id="START_DATETIME" size="32" maxlength="30"></td>
|
||||
<td><input type="checkbox" id="USE_START_DATETIME"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="right">END_DATETIME:</td>
|
||||
<td><input type="text" name="END_DATETIME" id="END_DATETIME" size="32" maxlength="30"></td>
|
||||
<td><input type="checkbox" id="USE_END_DATETIME"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">MON:</td>
|
||||
<td><input type="text" name="MON" id="MON" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_MON"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">TUE:</td>
|
||||
<td><input type="text" name="TUE" id="TUE" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_TUE"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">WED:</td>
|
||||
<td><input type="text" name="WED" id="WED" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_WED"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">THU:</td>
|
||||
<td><input type="text" name="THU" id="THU" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_THU"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">FRI:</td>
|
||||
<td><input type="text" name="FRI" id="FRI" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_FRI"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SAT:</td>
|
||||
<td><input type="text" name="SAT" id="SAT" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_SAT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SUN:</td>
|
||||
<td><input type="text" name="SUN" id="SUN" size="2" maxlength="1"></td>
|
||||
<td><input type="checkbox" id="USE_SUN"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">START DAYPART:</td>
|
||||
<td><input type="text" name="START_DAYPART" id="START_DAYPART" size="32" maxlength="30"></td>
|
||||
<td><input type="checkbox" id="USE_START_DAYPART"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="right">END DAYPART:</td>
|
||||
<td><input type="text" name="END_DAYPART" id="END_DAYPART" size="32" maxlength="30"></td>
|
||||
<td><input type="checkbox" id="USE_END_DAYPART"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">WEIGHT:</td>
|
||||
<td><input type="text" name="WEIGHT" id="WEIGHT" size="8" maxlength="6"></td>
|
||||
<td><input type="checkbox" id="USE_WEIGHT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">START POINT:</td>
|
||||
<td><input type="text" name="START_POINT" id="START_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_START_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">END POINT:</td>
|
||||
<td><input type="text" name="END_POINT" id="END_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_END_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">FADEUP POINT:</td>
|
||||
<td><input type="text" name="FADEUP_POINT" id="FADEUP_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_FADEUP_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">FADEDOWN POINT:</td>
|
||||
<td><input type="text" name="FADEDOWN_POINT" id="FADEDOWN_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_FADEDOWN_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SEGUE START POINT:</td>
|
||||
<td><input type="text" name="SEGUE_START_POINT" id="SEGUE_START_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_SEGUE_START_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">SEGUE END POINT:</td>
|
||||
<td><input type="text" name="SEGUE_END_POINT" id="SEGUE_END_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_SEGUE_END_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">HOOK START POINT:</td>
|
||||
<td><input type="text" name="HOOK_START_POINT" id="HOOK_START_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_HOOK_START_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">HOOK END POINT:</td>
|
||||
<td><input type="text" name="HOOK_END_POINT" id="HOOK_END_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_HOOK_END_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">TALK START POINT:</td>
|
||||
<td><input type="text" name="TALK_START_POINT" id="TALK_START_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_TALK_START_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">TALK END POINT:</td>
|
||||
<td><input type="text" name="TALK_END_POINT" id="TALK_END_POINT" size="16" maxlength="14"></td>
|
||||
<td><input type="checkbox" id="USE_TALK_END_POINT"></td>
|
||||
<td>Modify</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td align="left"><input type="button" onclick="EditCut_Submit();" value="OK"></td>
|
||||
<td align="right"><input type="button" onclick="EditCut_ShowPost();" value="Show POST"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
78
web/tests/editcut.js
Normal file
78
web/tests/editcut.js
Normal file
@@ -0,0 +1,78 @@
|
||||
// editcut.js
|
||||
//
|
||||
// Script for selecting cut label elements for the EditCut web method
|
||||
//
|
||||
// (C) Copyright 2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
function EditCut_Field(field)
|
||||
{
|
||||
if(document.getElementById("USE_"+field).checked) {
|
||||
return '&'+field+'='+UrlEncode(document.getElementById(field).value);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
function EditCut_MakePost()
|
||||
{
|
||||
var form='COMMAND=15';
|
||||
form+='&LOGIN_NAME='+document.getElementById("LOGIN_NAME").value;
|
||||
form+='&PASSWORD='+document.getElementById("PASSWORD").value;
|
||||
form+='&CART_NUMBER='+document.getElementById("CART_NUMBER").value;
|
||||
form+='&CUT_NUMBER='+document.getElementById("CUT_NUMBER").value;
|
||||
|
||||
form+=EditCut_Field("EVERGREEN");
|
||||
form+=EditCut_Field("DESCRIPTION");
|
||||
form+=EditCut_Field("OUTCUE");
|
||||
form+=EditCut_Field("ISRC");
|
||||
form+=EditCut_Field("ISCI");
|
||||
form+=EditCut_Field("START_DATETIME");
|
||||
form+=EditCut_Field("END_DATETIME");
|
||||
form+=EditCut_Field("MON");
|
||||
form+=EditCut_Field("TUE");
|
||||
form+=EditCut_Field("WED");
|
||||
form+=EditCut_Field("THU");
|
||||
form+=EditCut_Field("FRI");
|
||||
form+=EditCut_Field("SAT");
|
||||
form+=EditCut_Field("SUN");
|
||||
form+=EditCut_Field("START_DAYPART");
|
||||
form+=EditCut_Field("END_DAYPART");
|
||||
form+=EditCut_Field("WEIGHT");
|
||||
form+=EditCut_Field("START_POINT");
|
||||
form+=EditCut_Field("END_POINT");
|
||||
form+=EditCut_Field("FADEUP_POINT");
|
||||
form+=EditCut_Field("FADEDOWN_POINT");
|
||||
form+=EditCut_Field("SEGUE_START_POINT");
|
||||
form+=EditCut_Field("SEGUE_END_POINT");
|
||||
form+=EditCut_Field("HOOK_START_POINT");
|
||||
form+=EditCut_Field("HOOK_END_POINT");
|
||||
form+=EditCut_Field("TALK_START_POINT");
|
||||
form+=EditCut_Field("TALK_END_POINT");
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
function EditCut_ShowPost()
|
||||
{
|
||||
alert('form: '+EditCut_MakePost());
|
||||
}
|
||||
|
||||
|
||||
function EditCut_Submit()
|
||||
{
|
||||
PostForm(EditCut_MakePost(),"http://localhost/rd-bin/rdxport.cgi");
|
||||
}
|
||||
29
web/tests/listcartschedcodes.html
Normal file
29
web/tests/listcartschedcodes.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell LISTCARTSCHEDCODES Service Test Harness</title>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="27">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" size="20" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" size="20" maxlength="32"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CART NUMBER:</td>
|
||||
<td><input type="text" name="CART_NUMBER" size="8" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="OK"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
25
web/tests/listschedcodes.html
Normal file
25
web/tests/listschedcodes.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell LISTSCHEDCODES Service Test Harness</title>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="24">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" size="20" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" size="20" maxlength="32"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="OK"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
33
web/tests/unassignschedcode.html
Normal file
33
web/tests/unassignschedcode.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Rivendell UNASSIGNSCHEDCODE Service Test Harness</title>
|
||||
<body>
|
||||
<form action="/rd-bin/rdxport.cgi" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="COMMAND" value="26">
|
||||
<table cellpadding="0" cellspacing="2" border="0">
|
||||
<tr>
|
||||
<td align="right">LOGIN NAME:</td>
|
||||
<td><input type="text" name="LOGIN_NAME" size="20" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">PASSWORD:</td>
|
||||
<td><input type="password" name="PASSWORD" size="20" maxlength="32"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CART NUMBER:</td>
|
||||
<td><input type="text" name="CART_NUMBER" size="8" maxlength="6"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">CODE:</td>
|
||||
<td><input type="text" name="CODE" size="12" maxlength="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"><input type="submit" value="OK"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user