Jump to content

SkyRanger

Members
  • Posts

    738
  • Joined

  • Last visited

Contact Methods

  • MSN
    pffdave@hotmail.com

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,153 profile views

SkyRanger's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Thanks requinix got it working. Went a different way about it but did the trick.
  2. Sorry wrong one...lol. Been playing with a few. StreamTitle='Nat 'King' Cole - The Christmas Song';StreamUrl='&artist=Nat%20'King'%20Cole&title=The%20Christmas%20Song&album=100%20Classic%20Christmas%20Songs&duration=192601&songtype=S&overlay=NO&buycd=&website=&picture=az_2_100%20Classic%20Christmas%20Songs_Nat%20'King'%20Cole.jpg';
  3. Something like this: StreamTitle='Franke Carle - Little Jack Frost Get Lost';StreamUrl='&artist=Franke%20Carle&title=Little%20Jack%20Frost%20Get%20Lost&album=100%20Classic%20Christmas%20Songs&duration=164937&songtype=S&overlay=NO&buycd=&website=&picture=az_80_100%20Classic%20Christmas%20Songs_Franke%20Carle.jpg';
  4. Thanks requinix. Looking in to how to do that, should not be too difficult.
  5. Working on a media player for my website that users can download and listen to without needing to install 3rd party media player. I am having a problem pulling and showing the information from the array. Dim tags As String() = Bass.BASS_ChannelGetTagsMETA(stream) If tags Is Nothing Then ' try http... tags = Bass.BASS_ChannelGetTagsHTTP(stream) End If If Not (tags Is Nothing) Then Dim tag As String For Each tag In tags Console.WriteLine(tag) Next tag End If This is an example of what is being pulled and shown in console: Information I am trying to pull is StreamTitle, Artist and Title.
  6. Thanks Barand. Yeah I don't think I explained that correctly. table is called songlist with multiple columns but only pulling info from 2 of them . title = song title and artist = song artist. I have multiple song titles with the same name. ie: Jingle Bells sung by different artist. Right now I have it showing all the songs in the list without grouping them together. So once the person picks on a song title in the first box a list of artists shows in the second box who did that song.
  7. SkyRanger

    group by

    Not sure why I am thinking this is so hard but keep getting an error in my code (Visual Basic) Situation: database = xmas table = songlist column 1 = title column 2 = artist I have 2 dropdown boxes being populated box 1 is the title box 2 is the artist When person choses song in box 1 it populates the artist name in box 2 (this part is working) . The problem I am running in to is I need to group all of the songs that are the same to be listed in box 1 but not group the names in box 2 I have(had) select * from songlist group by title
  8. After scratching my head and staring at it for a bit. Figured it out. Need to verify a proper email is entered before continuing. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim par As String par = "^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" If Regex.IsMatch(txtEMAIL.Text, par) Then If txtFULLNAME.Text = "" Then Form6.Show() Form6.Label1.Text = "You must enter your Full Name" ElseIf txtEMAIL.Text = "" Then Form6.Show() Form6.Label1.Text = "You must enter your Email Address" Else Form5.Show() Form2.txtFULLNAME.Text = txtFULLNAME.Text Form3.txtFULLNAME.Text = txtFULLNAME.Text Form4.txtFULLNAME.Text = txtFULLNAME.Text Form5.txtFULLNAME.Text = txtFULLNAME.Text Form2.txtEMAIL.Text = txtEMAIL.Text Form3.txtEMAIL.Text = txtEMAIL.Text Form4.txtEMAIL.Text = txtEMAIL.Text Me.Hide() End If Else Form6.Show() Form6.Label1.Text = "You must enter a proper Email Address" End If End Sub
  9. Trying to figure out how to verify if email is an email. txtEMAIL.Text Imports System.Text.RegularExpressions Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If txtFULLNAME.Text = "" Then Form6.Show() Form6.Label1.Text = "You must enter your Full Name" ElseIf txtEMAIL.Text = "" Then Form6.Show() Form6.Label1.Text = "You must enter your Email Address" Else Form5.Show() Form2.txtFULLNAME.Text = txtFULLNAME.Text Form3.txtFULLNAME.Text = txtFULLNAME.Text Form4.txtFULLNAME.Text = txtFULLNAME.Text Form5.txtFULLNAME.Text = txtFULLNAME.Text Form2.txtEMAIL.Text = txtEMAIL.Text Form3.txtEMAIL.Text = txtEMAIL.Text Form4.txtEMAIL.Text = txtEMAIL.Text Me.Hide() End If End Sub Trying to figure out how to insert the Regex in to what is above to have it work properly Dim par As String par="^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" If Regex.IsMatch(txtEMAIL.Text, par) Then 'do nothing and continue' Else Form6.Show() Form6.Label1.Text = "You must enter a proper Email Address" End If
  10. Found the issue. Part of a table name was missing, thanks all.
  11. Not sure what I am missing. When submitted gives white page with no submission. Error check is not showing anything. global $userdata, $current_user; $tablename=kudos_table_name(); // Functions to filter user inputs function filterkudoagent($field){ // Sanitize user name $field = filter_var(trim($field), FILTER_SANITIZE_STRING); // Validate user name if(filter_var($field, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z-\s]+$/")))){ return $field; } else { return FALSE; } } function filterkudocust($field){ // Sanitize user name $field = filter_var(trim($field), FILTER_SANITIZE_STRING); // Validate user name if(filter_var($field, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^[a-zA-Z-\s]+$/")))){ return $field; } else { return FALSE; } } function filterString($field){ // Sanitize string $field = filter_var(trim($field), FILTER_SANITIZE_STRING); if(!empty($field)){ return $field; } else{ return FALSE; } } $kudoagentErr = $agentlocErr = $kudoclientErr = $kudocustErr = $kudomsgErr = $kudoadnErr = ""; $kudoagent = $agentloc = $kudoclient = $kudocust = $kudomsg = $kudoadn = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if(empty($_POST["kudoagent"])){ $kudoagentErr = "Please enter agent name."; } else{ $kudoagent = filterkudoagent($_POST["kudoagent"]); if($kudoagent == FALSE){ $kudoagentErr = "Please enter a valid agent name."; } } if(empty($_POST['agentloc'])){ $agentlocErr = "You must select a location"; } if(empty($_POST['kudoclient'])){ $kudoclientErr = "You must select a queue"; } if(empty($_POST["kudocust"])){ $kudocustErr = "Please enter customer name."; } else{ $kudocust = filterkudocust($_POST["kudocust"]); if($kudocust == FALSE){ $kudocustErr = "Please enter a valid customer name."; } } if(empty($_POST["kudomsg"])){ $kudomsgErr = "Please enter the kudos."; } else{ $kudomsg = filterString($_POST["kudomsg"]); if($kudomsg == FALSE){ $kudomsgErr = "Please enter a valid kudos."; } } if(empty($_POST["kudoadminname"])){ $kudoadnErr = "Please enter the posters name."; } else{ $kudoadn = filterkudocust($_POST["kudoadminname"]); if($kudoadn == FALSE){ $kudoadnErr = "Please enter a valid posters name."; } } if (isset($_POST['kudoagentid']) && trim($_POST['kudoagentid']) != '') { $kudoagidErr = "Enter Agent ID or leave blank"; } else { $kudoacctErr = ""; } if (isset($_POST['kudoacct']) && trim($_POST['kudoacct']) != '' && !ctype_digit($_POST['kudoacct'])) { $kudoacctErr = "Only numbers are permitted or leave blank"; } else { $kudoacctErr = ""; } if(empty($kudoagentErr) && empty($kudocustErr) && empty($kudomsgErr) && empty($agentlocErr) && empty($kudoclientErr) && empty($kudoadnErr)){ global $wpdb; $table = $tablename; $kudokey = randkey(); $kudoposted = date("Y-m-d H:i:s"); $data = array( 'kudoid' => '', 'kudomsg' => $_POST['kudomsg'], 'kudoagent' => $_POST['kudoagent'], 'kudoagentid' => $_POST['kudoagentid'], 'kudocust' => $_POST['kudocust'], 'kudoacct' => $_POST['kudoacct'], 'kudoclient' => $_POST['kudoclient'], 'kudoloc' => $_POST['agentloc'], 'kudoentry' => $kudoposted, 'kudoadmin' => $_POST['kudoadminname'], 'kudopic' => $_POST['kudobanner'], 'kudostatus' => '1', 'kudokey' => $kudokey, ); $format = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ); $success=$wpdb->insert( $table, $data, $format ); if($success){ echo "<blockquote class=\"otro-blockquote\">"; echo nl2br($_POST['kudomsg']); echo "<span>"; echo "<b>Kudos for:</b> " .$_POST['kudoagent']. " " .$_POST['kudoagentid']. ", ".$_POST['agentloc']; echo "<br>By: ".$_POST['kudocust']. ", " . date("F j, Y g:i a", strtotime($kudoposted)); echo "<br/>" .$_POST['kudoacct']; echo "<br/> Submitted By: " .$_POST['kudoadminname']; echo "</span></blockquote>"; $urlparts = parse_url(home_url()); $kudourl = $urlparts['host']; echo "<div class='success_msg'>Kudos Submitted</div>"; } } } else { ?> <h3>Add Kudos - No Notification Sent</h3> <b>* states required</b> <form name="kudos_form" id="submitkudos" method="post" action="" enctype="multipart/form-data"> <table class="addkudotable"> <tr> <td>Agent Name *</td> <td> </td> <td><input name="kudoagent" type="text" value="<?php echo $_POST['kudoagent']; ?>"/> <?php echo "<div class='note'>".$kudoagentErr."<br/>";?> </td> </tr> <tr> <td>Agent ID</td> <td></td> <td><input name="kudoagentid" type="text" value="<?php echo $_POST['kudoagentid']; ?>" /> <?php echo "<div class='note'> </div>";?> </td> </tr> <tr> <td>Agent Location *</td> <td></td> <td><select name="agentloc" size="1"> <option value="<?php echo $_POST['agentloc']; ?>"><?php echo $_POST['agentloc']; ?></option> <option></option> <option value="Amherst Center">Amherst Center</option> <option value="Charlottetown Center">Charlottetown Center</option> <option value="Kingston Center">Kingston Center</option> </select> <?php echo "<div class='note'>".$agentlocErr."</div>";?> </td> </tr> <tr> <td>Agent Queue *</td> <td></td> <td><select name="kudoclient" size="1"> <option value="<?php echo $_POST['kudoclient']; ?>"><?php echo $_POST['kudoclient']; ?></option> <option value=""></option> <option value="AR">AR</option> <option value="Eastlink Tech Support">Eastlink Tech Support</option> <option value="PNI">PNI</option> </select> <?php echo "<div class='note'>".$kudoclientErr."</div>";?> </td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td>Customer Name *</td> <td></td> <td><input name="kudocust" type="text" value="<?php echo $_POST['kudocust']; ?>"/> <?php echo "<div class='note'>".$kudocustErr."</div>";?> </td> </tr> <tr> <td>Customer Account #</td> <td></td> <td><input name="kudoacct" type="text" value="<?php echo $_POST['kudoacct']; ?>" /> <?php echo "<div class='note'>".$kudoacctErr."</div>";?> </td> </tr> <tr> <td>Kudos *</td> <td></td> <td><textarea cols="50" name="kudomsg" rows="5"><?php echo $_POST['kudomsg']; ?></textarea> <?php echo "<div class='note'>".$kudomsgErr."</div>";?> </td> </tr> <tr> <td></td> <td></td> <td></td> </tr> <tr> <td>Choose Image</td> <td></td> <td><select onchange="$('#imageToSwap').attr('src', this.options[this.selectedIndex].value);" name="kudobanner"> <option value="<?php echo plugins_url(); ?>/img/kudos/1.jpeg" selected>Kudos 1</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/2.jpg">Kudos 2</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/3.png">Kudos 3</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/4.png">Kudos 4</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/5.png">Kudos 5</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/6.jpg">Kudos 6</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/7.jpg">Kudos 7</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/8.jpg">Kudos 8</option> <option value="<?php echo plugins_url(); ?>/kudos/img/kudos/9.png">Kudos 9</option> </select></td> </tr> <tr> <td>Agent submitting Kudos</td> <td></td> <td><input name="kudoadminname" type="text" value="<?php echo $_POST['kudoadminname']; ?>"> <?php echo "<div class='note'>".$kudoadnErr."</div>";?></td> </tr> <tr> <td> </td> <td><input type="hidden" name="action" value=""/></td> <td></td> </tr> <tr> <td><button type="submit" value="submit" class="aciformbutton" name="submit" />Submit Kudos</button> <td></td> <td><button type="reset" value="reset" class="aciformbutton">Start Over</button></td> </tr> </table> <input type="hidden" value="" name="kudoentry"> </form> <script> </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <?php echo "<img id=\"imageToSwap\" class=\"profile\" src=" . plugins_url() . "/kudos/img/kudos/1.jpeg>"; }
  12. lol, thanks Barand. I was able to test it and it worked. So now it is bilingual but not Multi at this time. Maybe down the road.
  13. Adding this should work should it not? À-ÿ regexp"=>"/^[a-zA-ZÀ-ÿ-\s]+$/
  14. Then I am in trouble because it never crossed my mind until you brought it up.
×
×
  • 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.