Jump to content

jvanasco

New Members
  • Posts

    5
  • Joined

  • Last visited

jvanasco's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey all, my friend is using jwplayer, an older version and he has a playlist of videos that are supposed to play one after another however, for some reason its not working. I did notice that after running this code and viewing the source of the page that the 1st video seems to be listed twice and I am not sure why. I looked in the DB and anything related to the 1st video is only listed once. Any help would very much be appreciated. I am not totally familiar with PHP, I am still learning. I know enough to fix some things but this one has me really stumped. It seems like the issue is stemming from the 1st level section of the play list because the foreach function after that lists all of the videos correctly but it also includes the 1st video. If I remove the 1st level section the video player stops working. <div id="piano_gal_heading" align="center">Sonny's Piano TV Show Library </div> <style type="text/css"> #show_page { width: 800px; margin: auto; } #testimonials_heading { font-size: 24px; text-decoration: underline; font-variant: small-caps; font-weight: 800; letter-spacing: 10px; color: #1F3751; padding-top: 5px; padding-bottom: 5px; text-align:center; } #left_img { background-image:url('/images/bg_left_testimonials.jpg'); background-position:left; background-repeat:repeat-y; } #right_img { background-image:url('/images/bg_right_testimonials.jpg'); background-position:right; background-repeat:repeat-y; } .tv_show { background-color:#CFDBE6; margin-top:10px; padding:20px; min-height:160px; } .tv_show_img { margin-right:20px; } a.show_title:link { font-family: arial, sans serif; font-size: 1.1em; font-weight: 600; font-variant: small-caps; text-decoration: underline; font-style: normal; text-shadow: 1px 1px #333; color: #B50000; } a.show_title:visited { font-family: arial, sans serif; font-size: 1.1em; font-weight: 600; font-variant: small-caps; text-decoration: underline; font-style: normal; text-shadow: 1px 1px #333; color: #B50000; } a.show_title:hover { font-family: arial, sans serif; font-size: 1.1em; font-weight: 600; font-variant: small-caps; text-decoration: underline; font-style: normal; text-shadow: 1px 1px #333; color: #B50000; } a.show_title:active { font-family: arial, sans serif; font-size: 1.1em; font-weight: 600; font-variant: small-caps; text-decoration: underline; font-style: normal; text-shadow: 1px 1px #eee; color: #B50000; } a.whitelink:link { color: #FFFFFF; } a.whitelink:active { color: #CC0000; } a.whitelink:visited { color: FFFFFF; } a.whitelink:hover { color: #CC0000; } a.sp_link:link { color: #CC0000; font-style: italic; font-weight: 900; } a.sp_link:active { color: #FFFFFF; font-style: italic; font-weight: 900; } a.sp_link:visited { color: #CC0000; font-style: italic; font-weight: 900; } a.sp_link:hover { color: #990000; font-weight: 900; font-style: italic; background-color: #FFFFFF; } /*#main_content_wrapper { width:100%; }*/ </style> <div id="show_page"> <div class="page_title"> <!--<h1 id="testimonials_heading">Sonny's Piano TV Show Library</h1>--> <h3>Here you can see the full length versions of all of Sonny's Piano TV Shows.</h3> <?php if ($current_piano != NULL) { echo '<h2>#'.$current_piano->show_number.' : '.$current_piano->show_name.'</h2>'; } ?> </div> <div align="center" id="flv"> <?php if (strpos(strtolower($play_flv), '.jpg.flv') !== FALSE) : ?> <img style="width:100%;" src="<?php echo str_replace('.flv', '', $play_flv); ?>" alt="<?php echo $current_piano->show_name; ?>" > <?php else : ?> <div id="jw_gallery">Loading the player ...</div> <script type="text/javascript"> var titles = new Array(); <?php foreach ($playlist as $vid) : ?> titles.push("<?php echo str_replace('"', '', $vid['title']); ?>"); <?php endforeach; ?> var playlist = [ { levels: [ { file: "<?php echo $play_flv; ?>" } ] } <?php foreach ($playlist as $vid) : ?> , { levels: [ { file: "<?php echo $vid['flv']; ?>" } ] } <?php endforeach; ?> ]; jwplayer("jw_gallery").setup({ autoplay: true, repeat: "list", height: 470, width: 800, flashplayer:"<?php echo site_url(); ?>js/jwplayer/player.swf", playlist: playlist }).play().onPlaylistItem(function(e) { $('#featured_title').html(titles[e.index]); }); </script> <?php endif; ?> </div> <div> <p id="featured_title" align="center"> <?php if ($current_piano != NULL) { echo $current_piano->show_name; } ?> </p> </div> <center> <div style="clear: both;"></div> <p style="smallprint">Click on the media box above to stop the video or Click on the right arrow button to watch the next video </p> <div style="padding-right: 16px; padding-left: 16px; padding-top: 12px; padding-bottom: 10px;"> <?php echo isset($current_piano->show_desc) ? $current_piano->show_desc : ''; ?> </div> </center> <?php foreach ($tvshows as $key => $piano) : ?> <?php $thumb = SHOW_THUMB_PATH . 'show ' . $piano->show_number . '.jpg'; $thumb = (file_exists(SITE_PATH . $thumb)) ? base_url() . $thumb : base_url() . SHOW_THUMB_PATH . $piano->show_thumb; ?> <div class="tv_show"> <div> <a href="<?php echo site_url().'piano-tv-show/'.$piano->show_id; ?>"><img width="286" border="0" align="left" alt="Sonny's PianoTV Show <?php echo $piano->show_number; ?>" src="<?php echo $thumb; ?>" class="tv_show_img"></a> </div> <font face="Verdana, Arial" size="-1"><b><a href="<?php echo site_url().'piano-tv-show/'.$piano->show_id; ?>" class="show_title"><?php echo $piano->show_name; ?></a></b><br><?php echo $piano->show_desc; ?> </font> </div> <?php endforeach; ?> </div>
  2. okay it looks like my code mostly works but as you can see now it is messing up all my xml tags, Can I somehow limit it to just the post data? <?xml version='1.0' encoding='windows-1250'?> <project> <RequestNumber>5524445</RequestNumber> <company>purelygeek</company> <firstname>Jonathan</firstname> <lastname>Vanasco</lastname> <phone>6318915023</phone>
  3. I have a development server already for all my other projects, what I meant was I wanted help with the code before I uploaded to my dev server because I am sure that I am doing something wrong.
  4. Please excuse my messy code I am still very much learning how to use PHP. I have a php file that creates an xml file which then gets sent to my client using phpmailer. What is happening is when clients fill in my form/application it is allowing some ampersands and that is creating an issue when he is trying to import the xml into excel. What I was trying to do is us the htmlspecialchars function to fix this issue. My code is below which i have not synced up to the server yet as I want to make sure it will work. I really only need to make sure that any POST data in regards to ZONES is cleaning up any special characters. <?php foreach ($_POST as $key => $value) { $_POST[$key] = htmlspecialchars($value); } $myFile = "{$_POST['Last_Name']}-{$_POST['Request_Number']}.xml"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = "<?xml version='1.0' encoding='windows-1250'?> <project> <RequestNumber>{$_POST['Request_Number']}</RequestNumber> <company>{$_POST['Company']}</company> <firstname>{$_POST['First_Name']}</firstname> <lastname>{$_POST['Last_Name']}</lastname> <phone>{$_POST['Phone']}</phone> <fax>{$_POST['Fax']}</fax> <email>{$_POST['Email']}</email> <address>{$_POST['Address']}</address> <city>{$_POST['City']}</city> <state>{$_POST['State']}</state> <zipcode>{$_POST['Zipcode']}</zipcode> <ProjectName>{$_POST['Project_Name']}</ProjectName> <ProjectZipcode>{$_POST['Project_Zipcode']}</ProjectZipcode> <Ease>{$_POST['Ease_of_Installation']}</Ease> <Performance>{$_POST['Performance']}</Performance> <startdate>{$_POST['Start_Date']}</startdate> <installerlevel>{$_POST['Installer_Level']}</installerlevel> <Heatsource>{$_POST['Heatsource']}</Heatsource> <overallstructureinsulation>{$_POST['Overall_structure_insulation']}</overallstructureinsulation> <comments>{$_POST['Comments']}</comments> <ZoneName> <ZoneName1>{$_POST['Zone_Name']}</ZoneName1> <ZoneName2>{$_POST['Zone_Name2']}</ZoneName2> <ZoneName3>{$_POST['Zone_Name3']}</ZoneName3> <ZoneName4>{$_POST['Zone_Name4']}</ZoneName4> <ZoneName5>{$_POST['Zone_Name5']}</ZoneName5> <ZoneName6>{$_POST['Zone_Name6']}</ZoneName6> <ZoneName7>{$_POST['Zone_Name7']}</ZoneName7> <ZoneName8>{$_POST['Zone_Name8']}</ZoneName8> <ZoneName9>{$_POST['Zone_Name9']}</ZoneName9> <ZoneName10>{$_POST['Zone_Name10']}</ZoneName10> </ZoneName> <DesignTemperature> <DesignTemp1>{$_POST['Design_Temperature']}</DesignTemp1> <DesignTemp2>{$_POST['Design_Temperature2']}</DesignTemp2> <DesignTemp3>{$_POST['Design_Temperature3']}</DesignTemp3> <DesignTemp4>{$_POST['Design_Temperature4']}</DesignTemp4> <DesignTemp5>{$_POST['Design_Temperature5']}</DesignTemp5> <DesignTemp6>{$_POST['Design_Temperature6']}</DesignTemp6> <DesignTemp7>{$_POST['Design_Temperature7']}</DesignTemp7> <DesignTemp8>{$_POST['Design_Temperature8']}</DesignTemp8> <DesignTemp9>{$_POST['Design_Temperature9']}</DesignTemp9> <DesignTemp10>{$_POST['Design_Temperature10']}</DesignTemp10> </DesignTemperature> <SnowMeltingClass> <SnowMelting1>{$_POST['Snow_Melting']}</SnowMelting1> <SnowMelting2>{$_POST['Snow_Melting2']}</SnowMelting2> <SnowMelting3>{$_POST['Snow_Melting3']}</SnowMelting3> <SnowMelting4>{$_POST['Snow_Melting4']}</SnowMelting4> <SnowMelting5>{$_POST['Snow_Melting5']}</SnowMelting5> <SnowMelting6>{$_POST['Snow_Melting6']}</SnowMelting6> <SnowMelting7>{$_POST['Snow_Melting7']}</SnowMelting7> <SnowMelting8>{$_POST['Snow_Melting8']}</SnowMelting8> <SnowMelting9>{$_POST['Snow_Melting9']}</SnowMelting9> <SnowMelting10>{$_POST['Snow_Melting10']}</SnowMelting10> </SnowMeltingClass> <TypeOfTubing> <Tubing1>{$_POST['Tubing']}</Tubing1> <Tubing2>{$_POST['Tubing2']}</Tubing2> <Tubing3>{$_POST['Tubing3']}</Tubing3> <Tubing4>{$_POST['Tubing4']}</Tubing4> <Tubing5>{$_POST['Tubing5']}</Tubing5> <Tubing6>{$_POST['Tubing6']}</Tubing6> <Tubing7>{$_POST['Tubing7']}</Tubing7> <Tubing8>{$_POST['Tubing8']}</Tubing8> <Tubing9>{$_POST['Tubing9']}</Tubing9> <Tubing10>{$_POST['Tubing10']}</Tubing10> </TypeOfTubing> <TypeOfInstallation> <Type_of_Installation1>{$_POST['Type_of_Installation']}</Type_of_Installation1> <Type_of_Installation2>{$_POST['Type_of_Installation2']}</Type_of_Installation2> <Type_of_Installation3>{$_POST['Type_of_Installation3']}</Type_of_Installation3> <Type_of_Installation4>{$_POST['Type_of_Installation4']}</Type_of_Installation4> <Type_of_Installation5>{$_POST['Type_of_Installation5']}</Type_of_Installation5> <Type_of_Installation6>{$_POST['Type_of_Installation6']}</Type_of_Installation6> <Type_of_Installation7>{$_POST['Type_of_Installation7']}</Type_of_Installation7> <Type_of_Installation8>{$_POST['Type_of_Installation8']}</Type_of_Installation8> <Type_of_Installation9>{$_POST['Type_of_Installation9']}</Type_of_Installation9> <Type_of_Installation10>{$_POST['Type_of_Installation10']}</Type_of_Installation10> </TypeOfInstallation> <SlabThickness> <SlabThickness1>{$_POST['Slab_Thickness']}</SlabThickness1> <SlabThickness2>{$_POST['Slab_Thickness2']}</SlabThickness2> <SlabThickness3>{$_POST['Slab_Thickness3']}</SlabThickness3> <SlabThickness4>{$_POST['Slab_Thickness4']}</SlabThickness4> <SlabThickness5>{$_POST['Slab_Thickness5']}</SlabThickness5> <SlabThickness6>{$_POST['Slab_Thickness6']}</SlabThickness6> <SlabThickness7>{$_POST['Slab_Thickness7']}</SlabThickness7> <SlabThickness8>{$_POST['Slab_Thickness8']}</SlabThickness8> <SlabThickness9>{$_POST['Slab_Thickness9']}</SlabThickness9> <SlabThickness10>{$_POST['Slab_Thickness10']}</SlabThickness10> </SlabThickness> <ThinSlab> <thinslab1>{$_POST['Thin_Slab']}</thinslab1> <thinslab2>{$_POST['Thin_Slab2']}</thinslab2> <thinslab3>{$_POST['Thin_Slab3']}</thinslab3> <thinslab4>{$_POST['Thin_Slab4']}</thinslab4> <thinslab5>{$_POST['Thin_Slab5']}</thinslab5> <thinslab6>{$_POST['Thin_Slab6']}</thinslab6> <thinslab7>{$_POST['Thin_Slab7']}</thinslab7> <thinslab8>{$_POST['Thin_Slab8']}</thinslab8> <thinslab9>{$_POST['Thin_Slab9']}</thinslab9> <thinslab10>{$_POST['Thin_Slab10']}</thinslab10> </ThinSlab> <OverSubfloor> <OverSubfloor1>{$_POST['Over_Subfloor']}</OverSubfloor1> <OverSubfloor2>{$_POST['Over_Subfloor2']}</OverSubfloor2> <OverSubfloor3>{$_POST['Over_Subfloor3']}</OverSubfloor3> <OverSubfloor4>{$_POST['Over_Subfloor4']}</OverSubfloor4> <OverSubfloor5>{$_POST['Over_Subfloor5']}</OverSubfloor5> <OverSubfloor6>{$_POST['Over_Subfloor6']}</OverSubfloor6> <OverSubfloor7>{$_POST['Over_Subfloor7']}</OverSubfloor7> <OverSubfloor8>{$_POST['Over_Subfloor8']}</OverSubfloor8> <OverSubfloor9>{$_POST['Over_Subfloor9']}</OverSubfloor9> <OverSubfloor10>{$_POST['Over_Subfloor10']}</OverSubfloor10> </OverSubfloor> <JoistSpacing> <JoistSpacing1>{$_POST['Joist_Spacing']}</JoistSpacing1> <JoistSpacing2>{$_POST['Joist_Spacing2']}</JoistSpacing2> <JoistSpacing3>{$_POST['Joist_Spacing3']}</JoistSpacing3> <JoistSpacing4>{$_POST['Joist_Spacing4']}</JoistSpacing4> <JoistSpacing5>{$_POST['Joist_Spacing5']}</JoistSpacing5> <JoistSpacing6>{$_POST['Joist_Spacing6']}</JoistSpacing6> <JoistSpacing7>{$_POST['Joist_Spacing7']}</JoistSpacing7> <JoistSpacing8>{$_POST['Joist_Spacing8']}</JoistSpacing8> <JoistSpacing9>{$_POST['Joist_Spacing9']}</JoistSpacing9> <JoistSpacing10>{$_POST['Joist_Spacing10']}</JoistSpacing10> </JoistSpacing> <Subfloor> <Subfloor1>{$_POST['Subfloor']}</Subfloor1> <Subfloor2>{$_POST['Subfloor2']}</Subfloor2> <Subfloor3>{$_POST['Subfloor3']}</Subfloor3> <Subfloor4>{$_POST['Subfloor4']}</Subfloor4> <Subfloor5>{$_POST['Subfloor5']}</Subfloor5> <Subfloor6>{$_POST['Subfloor6']}</Subfloor6> <Subfloor7>{$_POST['Subfloor7']}</Subfloor7> <Subfloor8>{$_POST['Subfloor8']}</Subfloor8> <Subfloor9>{$_POST['Subfloor9']}</Subfloor9> <Subfloor10>{$_POST['Subfloor10']}</Subfloor10> </Subfloor> <Area> <Area1>{$_POST['Area']}</Area1> <Area2>{$_POST['Area2']}</Area2> <Area3>{$_POST['Area3']}</Area3> <Area4>{$_POST['Area4']}</Area4> <Area5>{$_POST['Area5']}</Area5> <Area6>{$_POST['Area6']}</Area6> <Area7>{$_POST['Area7']}</Area7> <Area8>{$_POST['Area8']}</Area8> <Area9>{$_POST['Area9']}</Area9> <Area10>{$_POST['Area10']}</Area10> </Area> <WindowArea> <WindowArea1>{$_POST['Window_Area']}</WindowArea1> <WindowArea2>{$_POST['Window_Area2']}</WindowArea2> <WindowArea3>{$_POST['Window_Area3']}</WindowArea3> <WindowArea4>{$_POST['Window_Area4']}</WindowArea4> <WindowArea5>{$_POST['Window_Area5']}</WindowArea5> <WindowArea6>{$_POST['Window_Area6']}</WindowArea6> <WindowArea7>{$_POST['Window_Area7']}</WindowArea7> <WindowArea8>{$_POST['Window_Area8']}</WindowArea8> <WindowArea9>{$_POST['Window_Area9']}</WindowArea9> <WindowArea10>{$_POST['Window_Area10']}</WindowArea10> </WindowArea> <WallLength> <WallLength1>{$_POST['Wall_Length']}</WallLength1> <WallLength2>{$_POST['Wall_Length2']}</WallLength2> <WallLength3>{$_POST['Wall_Length3']}</WallLength3> <WallLength4>{$_POST['Wall_Length4']}</WallLength4> <WallLength5>{$_POST['Wall_Length5']}</WallLength5> <WallLength6>{$_POST['Wall_Length6']}</WallLength6> <WallLength7>{$_POST['Wall_Length7']}</WallLength7> <WallLength8>{$_POST['Wall_Length8']}</WallLength8> <WallLength9>{$_POST['Wall_Length9']}</WallLength9> <WallLength10>{$_POST['Wall_Length10']}</WallLength10> </WallLength> <DoorArea> <DoorArea1>{$_POST['Door_Area']}</DoorArea1> <DoorArea2>{$_POST['Door_Area2']}</DoorArea2> <DoorArea3>{$_POST['Door_Area3']}</DoorArea3> <DoorArea4>{$_POST['Door_Area4']}</DoorArea4> <DoorArea5>{$_POST['Door_Area5']}</DoorArea5> <DoorArea6>{$_POST['Door_Area6']}</DoorArea6> <DoorArea7>{$_POST['Door_Area7']}</DoorArea7> <DoorArea8>{$_POST['Door_Area8']}</DoorArea8> <DoorArea9>{$_POST['Door_Area9']}</DoorArea9> <DoorArea10>{$_POST['Door_Area10']}</DoorArea10> </DoorArea> <CeilingHeight> <CeilingHeight1>{$_POST['Ceiling_Height']}</CeilingHeight1> <CeilingHeight2>{$_POST['Ceiling_Height2']}</CeilingHeight2> <CeilingHeight3>{$_POST['Ceiling_Height3']}</CeilingHeight3> <CeilingHeight4>{$_POST['Ceiling_Height4']}</CeilingHeight4> <CeilingHeight5>{$_POST['Ceiling_Height5']}</CeilingHeight5> <CeilingHeight6>{$_POST['Ceiling_Height6']}</CeilingHeight6> <CeilingHeight7>{$_POST['Ceiling_Height7']}</CeilingHeight7> <CeilingHeight8>{$_POST['Ceiling_Height8']}</CeilingHeight8> <CeilingHeight9>{$_POST['Ceiling_Height9']}</CeilingHeight9> <CeilingHeight10>{$_POST['Ceiling_Height10']}</CeilingHeight10> </CeilingHeight> <HeatedAbove> <heatedabove1>{$_POST['Heated_Above']}</heatedabove1> <heatedabove2>{$_POST['Heated_Above2']}</heatedabove2> <heatedabove3>{$_POST['Heated_Above3']}</heatedabove3> <heatedabove4>{$_POST['Heated_Above4']}</heatedabove4> <heatedabove5>{$_POST['Heated_Above4']}</heatedabove5> <heatedabove6>{$_POST['Heated_Above6']}</heatedabove6> <heatedabove7>{$_POST['Heated_Above7']}</heatedabove7> <heatedabove8>{$_POST['Heated_Above8']}</heatedabove8> <heatedabove9>{$_POST['Heated_Above9']}</heatedabove9> <heatedabove10>{$_POST['Heated_Above10']}</heatedabove10> </HeatedAbove> <HeatedBelow> <heatedbelow1>{$_POST['Heated_Below']}</heatedbelow1> <heatedbelow2>{$_POST['Heated_Below2']}</heatedbelow2> <heatedbelow3>{$_POST['Heated_Below3']}</heatedbelow3> <heatedbelow4>{$_POST['Heated_Below4']}</heatedbelow4> <heatedbelow5>{$_POST['Heated_Below5']}</heatedbelow5> <heatedbelow6>{$_POST['Heated_Below6']}</heatedbelow6> <heatedbelow7>{$_POST['Heated_Below7']}</heatedbelow7> <heatedbelow8>{$_POST['Heated_Below8']}</heatedbelow8> <heatedbelow9>{$_POST['Heated_Below9']}</heatedbelow9> <heatedbelow10>{$_POST['Heated_Below10']}</heatedbelow10> </HeatedBelow> <QuoteBaseboard> <QuoteBaseboard1>{$_POST['Quote_Baseboard']}</QuoteBaseboard1> <QuoteBaseboard2>{$_POST['Quote_Baseboard2']}</QuoteBaseboard2> <QuoteBaseboard3>{$_POST['Quote_Baseboard3']}</QuoteBaseboard3> <QuoteBaseboard4>{$_POST['Quote_Baseboard4']}</QuoteBaseboard4> <QuoteBaseboard5>{$_POST['Quote_Baseboard5']}</QuoteBaseboard5> <QuoteBaseboard6>{$_POST['Quote_Baseboard6']}</QuoteBaseboard6> <QuoteBaseboard7>{$_POST['Quote_Baseboard7']}</QuoteBaseboard7> <QuoteBaseboard8>{$_POST['Quote_Baseboard8']}</QuoteBaseboard8> <QuoteBaseboard9>{$_POST['Quote_Baseboard9']}</QuoteBaseboard9> <QuoteBaseboard10>{$_POST['Quote_Baseboard10']}</QuoteBaseboard10> </QuoteBaseboard> <Glycol> <Glycol1>{$_POST['Glycol']}</Glycol1> <Glycol2>{$_POST['Glycol2']}</Glycol2> <Glycol3>{$_POST['Glycol3']}</Glycol3> <Glycol4>{$_POST['Glycol4']}</Glycol4> <Glycol5>{$_POST['Glycol5']}</Glycol5> <Glycol6>{$_POST['Glycol6']}</Glycol6> <Glycol7>{$_POST['Glycol7']}</Glycol7> <Glycol8>{$_POST['Glycol8']}</Glycol8> <Glycol9>{$_POST['Glycol9']}</Glycol9> <Glycol10>{$_POST['Glycol10']}</Glycol10> </Glycol> <DomesticHotWater>{$_POST['Domestic_Hot_Water']}</DomesticHotWater> <NumberOfShowers>{$_POST['Showers']}</NumberOfShowers> <SimultaneousShowers>{$_POST['Simultaneous_Showers']}</SimultaneousShowers> <NumberOfSinks>{$_POST['Sinks']}</NumberOfSinks> <Vanities>{$_POST['Vanities']}</Vanities> <Toilets>{$_POST['Toilets']}</Toilets> <Washers>{$_POST['Washers']}</Washers> <Spigots>{$_POST['Spigots']}</Spigots> "; $stringData = htmlspecialchars($stringData); fwrite($fh, $stringData); $stringData = "</project>\n"; fwrite($fh, $stringData); fclose($fh); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.