% % parse uploaded file in .txt files % move uploaded file with proper extension % to Cphone\Tphone area of results with Upl_ prefix % with time stamp prefix and generated Twid style message in Work\Twid % for Cphone conduit consumption % copy in placeholder .jpg for type of file, 75x75 % leave Upl_ time stamp .flx residue for thumbnail conversion % to Upl_ time stampX.jpg fit into 75x75 size % use generated time stamp.jpg as part of sms message to conduit % with possible Psd file is and definite Jpg file is constructs % % caption:|phsrc:6787867816|phdest:5594928743|mesg:73696D65206D73672068657265|outgo:C:\fakepath\FlagBump.jpg|Upl:C:\___Fire\Fup\FileUpload\App_Data\BodyPart_193a5667-9eec-474b-a647-fc68ded13827(75435)| % empty ofupl empty { empty nextext ? "........ nextup" log)( empty !Luq.outgo execing _Luq.outgo any)? { % % successfully copied, decode the incoming upload % _Luq.fname extension dup < |.jpeg pop ".jpg" > pop !Fup.Ext % % validate the phone numbers for the upload % dup "_" 0 2 1 parse !Fup.Phdest !Fup.Phsrc _Fup.Phsrc length) 10 eq _Fup.Phdest length) 10 eq and _Luq.flen numeric and { % % validated, perform component creation % _Luq.fname !Fup.Outgo _Luq.flen !Fup.Size Fup.UnSame _Fup.Phdest ^"+1" !Cnv.SrcTo _Fup.Phsrc ^"+1" !Cnv.SrcFrom filing !Fup.Basis basenow !Msg.msec Xact.Msg$ !Msg.xact Xact.From !Fup.Fsrc Xact.FromTo !Fup.Fdest Xact.FromToF !Fup.Fbase % % create the temp thumbnail % "Upload" Fup.!Fmark % % create the upload report using the from and to numbers % Xact.FromToM !Fup.PartUrl _Fup.Mesg hex2asc % % perform html encode here % dup !Cnv.SrcBody % % clear prior phone stake % Fup.Phone/ % % add new phone stake % &" (PHONE)" Fup.IsJpg not { % % for all file types other than jpg, mark as psd % png is another base type like jpg % Fup.PsdOrPng { % % is psd or png so has ext marking % Fup.TagBody } { % % other extension type, mark with actual extension type % _Fup.Ext upper parens & &" The PSD is " } ifelse Xact.FromToX "xftx" log)( dup !Fup.FinUrl Fup.IsPng { png } { psd } ifelse } { % % has to be jpg type % &" The JPG is " Xact.FromToX dup !Fup.FinUrl jpg } ifelse & !Fup.ExtBody % % create the html row record for this entry % write into dest, this is for the originating Colab % 14 *tacksorc "" 1 1 1 parse "___Alter___" "A" replall "___Xact___" _Msg.xact replall "___MsgId___" _Msg.msgid replall "___Cphone___" _Fup.Phsrc dup !Msgr.SrcPh replall "___Tphone___" _Fup.Phdest dup !Msgr.DestPh replall "___Type___" _Fup.Ext dup !Msgr.Type &" <<<" replall "To" !Msgr.Dir "___Message___" _Cnv.SrcBody Fup.Phone/ dup !Msgr.Body replall Xact.DTrepl "___File___" _Fup.Phsrc dup !Msgr.Phone &" " _Fup.Outgo filename dup !Msgr.OrigFile & replall "R" Fup.!Ftext *fupljrow &'MsgrFinal(); ' &'MsgRow++; ' "J" Fup.!Ftext % % if this is the linked PhoSend's Colab, no need to write again % _Fup.Phsrc _Fup.Phdest eq$ { % % this is intended for the linked PhoSend identity Colab % } { % % not the same from and to, make a copy in identity folder % Xact.From !Fup.FsrcS Xact.FromFrom !Fup.FdestS _Fup.FdestS &_Msg.xact !Fup.FbaseS 14 *tacksorc "" 1 1 1 parse "___Alter___" "A" replall "___Xact___" _Msg.xact replall "___MsgId___" _Msg.msgid replall "___Cphone___" _Fup.Phsrc replall "___Tphone___" _Fup.Phdest replall "___Type___" _Fup.Ext replall "___Message___" _Cnv.SrcBody Fup.Phone/ replall Xact.DTrepl "___File___" _Fup.Phdest dup !Msgr.Phone &" " _Fup.Outgo filename & replall % % add the hidden field to identify came from another source % ` ` & "R" Fup.!FtexS *fupljrow &'MsgrFinal(); ' &'MsgRow++; ' "J" Fup.!FtexS } ifelse % % move the uploaded file into dest % /* _Fup.Fupl &".fil" */ "Luq\src\Web\uploads\" ofapp empty dup !fil { % % move any file % "????????????????????????????????????__" &_Luq.fname !wilder nextfile ? filing !fil true ? } loop filing) _fil "()()()()()()" log)( _Fup.Fbase % % write the final file as psd if not % jpg or psd or png % Fup.PsdPngJpg { % % allowed types % &_Fup.Ext } { % % other extensions must be copied as psd % psd } ifelse dup !Fup.Split "()()()()()()" log)( copyfile *fuplsplt empty "Msg.msec" sval "Msg.xact" sval "Msg.msgid" sval "Msg.msec" sval "Fup.ExtBody" sval "Fup.Ext" sval "Fup.Phsrc" sval "Fup.Phdest" sval "Fup.PartUrl" sval "Fup.FinUrl" sval "Fup.Fupl" sval "Fup.DestUrl" sval "Fup.Size" sval "Cnv.MmsFname" sval "Fup.Basis" sval "Fup.Split" sval "Fup.Fsrc" sval "Fup.Fdest" sval "Fup.Fbase" sval "Fup.FdestS" sval "Fup.FbaseS" sval "Cnv.SrcBody" sval "Msgr.Same" sval "Msgr.Samf" sval "Msgr.Samg" sval % % write the thumbnail activator into Mms of Work % only if jpg or psd % Fup.PsdPngJpg { dup _Msg.xact &"_" &_Fup.Phsrc &".fly" ofmms ".flx" safeto } if % % also write into dest % empty Fup.!Fflex % % message to the PhoSend program % reverse from/to xml message % "SM" File.Sid !Cnv.SrcSid % % identifies the PhoSend program % Fup.From &"_" Fup.!MmsFname *fuplwmsg empty _Fup.ExtBody Fup.Body& Fup.BackFrom& Fup.BackTo& 0 Fup.Medias& Fup.Orig& *fuplplum _Cnv.MmsFname &"_0.txt" *fuplwtwi % % don't write the destination message if from/to are the same % Fup.NotEq "***************" log)( { % % this is the message for a PhoSend the Colab represents % other than the PhoSend it is linked to % write the normal from/to xml message % /* xma and xmb are created cxc twibase copy of txt */ Fup.To &"_" Fup.!MmsFname *fuplwmsg empty _Fup.ExtBody Fup.Body& % % this should identify as sending from the colab itself % Fup.BackFrom& Fup.BackTo& 0 Fup.Medias& *fuplplum _Cnv.MmsFname &"_0.txt" *fuplwtwi % % repeat this message for all team members if it is not the linked colab PhoSend % or the colab number itself % % this is the linked PhoSend Gating directory % false !Fup.InTeamA false !Fup.InTeamB false !Fup.InTeamC false !Fup.InTeamD Fup.From ofgate dup !Fup.TeamGate empty { % % check for team inclusion of our colab number % Fup.To &"?.txt" !wilder nextfile ? dup -10 left 1 left ^"Fup.InTeam" true exch ! } loop filing) % % now have identified teams our non-identity colab is part of % % write an xml message to the team members in case they are % another PhoSend % "A" *fuplsnds "B" *fuplsnds "C" *fuplsnds "D" *fuplsnds "A" *fuplsnes "B" *fuplsnes "C" *fuplsnes "D" *fuplsnes } if finaled } { % % improper upload values % filing ".err" overext } ifelse true } { false } ifelse ? } loop filing)