ReportWire

Category: Humor

Humor | ReportWire publishes the latest breaking U.S. and world news, trending topics and developing stories from around globe.

  • Eye Contact-Avoiding Biden Administration Still Hasn’t Said Word To Each Other Since Last Night

    Eye Contact-Avoiding Biden Administration Still Hasn’t Said Word To Each Other Since Last Night

    [ad_1]

    WASHINGTON—In the wake of what was widely viewed as a disastrous debate performance, eye contact-avoiding members of the Biden administration still haven’t said a word to each other since last night, sources confirmed Friday. According to sources, White House aides and advisors were seen averting their gaze as they wordlessly walked straight to their desks and stared at the black screens of their computers, unwilling to log on. Several reports indicated that, despite being an exceptionally busy work day in which members of the press were seeking comment on the president’s unexpectedly weak showing the night before, everyone in Biden’s orbit had sequestered themselves away from others and turned their phones off in order to avoid calls. At press time, the silence was finally broken by Biden’s pained moaning.

    [ad_2]

    Source link

  • Trump vs. Biden Debate: Why Don’t You Make Me Shut Up?

    Trump vs. Biden Debate: Why Don’t You Make Me Shut Up?

    [ad_1]

    This is the sequel we all want to see! President Donald Trump and his first man Joe Biden! Such progressive love! You sure wish you could vote for them both, don’t you?

    The post Trump vs. Biden Debate: Why Don’t You Make Me Shut Up? first appeared on Crazy Funny Pictures.

    [ad_2]

    liver

    Source link

  • The Presidential Debate In a Nutshell

    The Presidential Debate In a Nutshell

    [ad_1]

    Did you miss the presidential debate between Trump and Biden? Are you wondering how it went? Well, wonder no more! This picture perfectly explains it.

    The post The Presidential Debate In a Nutshell first appeared on Crazy Funny Pictures.

    [ad_2]

    liver

    Source link

  • Bruh!!\ud83d\ude02

    Bruh!!\ud83d\ude02

    [ad_1]

    Tags: funny, meme

    5621 points, 248 comments.

    [ad_2]

    Source link

  • Up In Smoke

    Up In Smoke

    [ad_1]

    Happy Friday to those who celebrate. Enjoy it while it lasts, because
    Greg L.
    has some bad news.
    "It was nice hanging out with all of you, but it looks like the Sun is scheduled to expire Sunday morning."
    It's worse than that: the laws of physics are being replaced.


     

    Ben S.
    shares a WTF that actually makes me glad I don't own one of those printers.
    "The printer was turned off for at least three days before
    I turned it on yesterday morning (June 18), but I didn't
    get this reminder until it had been turned on for almost
    24 hours. Maybe they've confused off and on?"

    3

     

    Bart
    needs a legal opinion, so naturally he asked the Internet.
    "I guess we're skipping the terms&conditions now, nobody reads them anyway. Agree or Exit?"
    I'd agree, surely those terms can't be enforceable.

    2

     

    Dane
    Jeppe
    makes me wonder if the Roman empire ever made
    it that far north. My memory of European history is fading,
    but I think the answer is no. Which surely explains his
    confusion when he rants
    "Buy a new watch and get 10 to 99 percent discount! Which one will it be? We won't tell you!"
    XX is obviously 20, Jeppe.

    1

     

    Finally,
    Mr. TA
    has found a possible explanation for a large portion of the content on this site, muttering
    "they should study the creators of PHP while they're at it"

    0

     

    [Advertisement]
    Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!

    [ad_2]

    Lyle Seaman

    Source link

  • Power Pose

    Power Pose

    [ad_1]

    “My daughter’s kindergarten photo.”

    (submitted by IG @cghaybda)

    The post Power Pose appeared first on AwkwardFamilyPhotos.com.

    [ad_2]

    Team Awkward

    Source link

  • Relieved Trump, Biden End Debate After Realizing Neither Of Them Really Wants To Be President

    Relieved Trump, Biden End Debate After Realizing Neither Of Them Really Wants To Be President

    [ad_1]

    ATLANTA—Stressing that they wished they had talked about this months ago instead of waiting until now, a relieved Donald Trump and Joe Biden ended the first presidential debate of 2024 Thursday after realizing neither of them really wanted to be president. The two candidates, who had been bitter enemies along the campaign trail, reportedly stopped the debate when Biden abruptly admitted he didn’t want to do this anymore, at which point Trump perked up, said, “Wait, you too?” and revealed that he was just running because he thought Biden wanted to win. According to sources, the two former commanders-in-chief then burst into laughter and said, “Same, I fucking hate this country.” Despite protests from moderators Jake Tapper and Dana Bash, Biden and Trump proceeded to remove their microphones, ties, and jackets, walk towards the exit, hug, and then hop into a red convertible, speeding off into the sunset together. At press time, Robert F. Kennedy Jr. had reportedly been declared the next president of the United States after being the only person in the entire nation dumb enough to take the job.

    [ad_2]

    Source link

  • UFC star and Chivette, Paige VanZant goes from menace to model

    UFC star and Chivette, Paige VanZant goes from menace to model

    [ad_1]

    30-year-old Paige VanZant is leaning more lover than fighter these days, and there is nothing wrong with that. According to TMZ Sports, the 8-5-0 record holder is no longer focusing on combat sports full-time. VanZant has shifted focus to her lucrative modelling career, thanks to sites such as OnlyFans.

    She stated, “Fighting, I have to understand now, is just a hobby.”

    [ad_2]

    Zach

    Source link

  • Kendall Jenner Strolling Barefoot Through The Louvre Has People Baffled: “Rich People Are So Weird”

    Kendall Jenner Strolling Barefoot Through The Louvre Has People Baffled: “Rich People Are So Weird”

    [ad_1]

    The internet was baffled and bemused to see Kendall Jenner visiting the world’s most famous museum barefoot.

    During her eventful trip in Paris, the 28-year-old supermodel’s itinerary included a trip to the Louvre, after which she shared a whimsical photo of herself striking a pose in front of Leonardo da Vinci’s Mona Lisa and Paola Veronese’s The Wedding at Cana.

    “The Louvre at midnight,” she captioned the Instagram Carousel.

    Kendall Jenner was trolled for being a “different kind of rich” after waltzing around the Louvre barefoot

    Image credits: Kendall Jenner / Instagram

    While the art aficionados among her followers marveled at her nighttime access to the museum, many couldn’t help but notice the glaring absence of footwear on her feet.

    “We get it. You’re so filthy rich you can get the Louvre to open at midnight just for you to walk barefoot around the historic halls,” said one of the top comments.

    “Wish i could go at midnight too when theres no peiple [sic],” one said, while a third comment read, “You know how powerful this woman is when she can have all the Louvre for herself in the middle of the night.”

    “The Louvre at midnight,” the reality TV star wrote in the caption of her Instagram Carousel

    Image credits: Kendall Jenner / Instagram

    “Where are your shoes girl,” one asked.

    Another said she is “a different kind of rich.”

    Rich people are so weird,” one wrote.

    One social media comment on her post said, “We get it. You’re so filthy rich you can get the louvre to open at midnight just for you to walk barefoot around the historic halls”

    Image credits: Kendall Jenner / Instagram

    Some reports said the runway queen visited the museum on Monday, June 24, with her 30-year-old beau, Bad Bunny. The pair were pictured leaving a FWRD Paris Fashion Week event together on Monday and heading to La Girafe restaurant for dinner.

    The three-time Grammy winner and the supermodel broke up in December after less than a year of dating. They appeared to have rekindled their romance this spring and were seen spending time together at a Met Gala after-party.

    They were “having the best time” together and “whispering in each other’s ears,” a witness told People.

    Bad Bunny and the runway queen rekindled their romance after breaking up in December

    Another insider confirmed to the outlet in May that their breakup was drama-free and they “missed each other” during their time apart.

    “It’s going well and they’re prioritizing spending time together as they figure it out,” an insider said at the time. “There wasn’t ever any drama in their breakup and they missed each other.”

    Kendall’s trip to the Louvre came at the heels of her appearance at Vogue World: Paris, during which she and Gigi Hadid rode in on horses.

    [ad_2] Binitha Jacob
    Source link

  • A Stack of XML

    A Stack of XML

    [ad_1]

    Alice works with an XML-based RPC system. They send requests, it does a thing, and returns back a response, all surrounded in XML. The service sending the requests, however, doesn’t use a well-established parsing library. The result is that, well, the code ends up here.

    First, though, a bit about the data they expect to parse. It’s verbose, but fairly straightforward:

    <methodResponse>
      <params>
        <param>
          <value>
            <struct>
              <member>
                <name>fooname>
                <value>
                  <string>abcdestring>
                value>
              member>
              <member>
                <name>barname>
                <value>
                  <int>12345int>
                value>
              member>
            struct>
          value>
        param>
      params>
    methodResponse>
    

    The tree is awkward, but the response contains params, where each param may contain a struct, the struct may contain members, which have a name and a value, where the value contains the actual data, wrapped in a type.

    But there’s one thing missing here: the service which sends this response recently changed its API, and for some fields, includes an empty tag, instead of a value. This particular client doesn’t care about data fields, and should be able to safely ignore them if they exist.

    Now, you might think, “well, that should be easy then,” and you’d be right if you were just using a generic XML parser. They didn’t do that. They hand-rolled a parser that is specific to this data format. So let’s see what happened:

    void XmlRpcResponseParser::OnStartElement(const XML_Char *pszName, const XML_Char **papszAttrs)
    {
        const string element = pszName;
        
        if (_states.empty()) {
            if (element != "methodResponse" && !_get_method_response) {
                throw "Invalid top-level element <" + element + "> expecting ";
            }
    
            _got_method_response = true;
            _states.push(&response);
        }
    
        if (element == "fault") {
            
            is_fault = true;
        } else if (!is_fault && element == "struct") {
            top()->type = XML_RPC_STRUCT;
        } else if (!is_fault && element == "array") {
            top()->type = XML_RPC_ARRAY;
        } else if (!is_fault && (element == "data" || element == "value")) {
            if (top()->type == XML_RPC_ARRAY) {
                top()->xml_array.push_back(Entry());
                _states.push(&top()->xml_array.back());  
            }
        }
    
        _cdata.clear();
    }
    

    Here, they track a stack, so they can keep track of where they are in parsing. Oh, except they don’t. They only push onto the stack when they encounter a data or a value element. When the response only contained values, this worked fine. So for years, it sat like this.

    But when they added data tags, it stopped working, specifically because of how they handle closing tags:

    void XmlRpcResponseParser::OnEndElement(const XML_Char *pszName)
    {
        const string element = pszName;
    
        if (element == "int" || element == "i4") {
            top()->integer = atoi(chomp(_cdata).c_str());
            top()->type = XML_RPC_INTEGER;
        } else if (element == "string") {
            top()->str = _cdata;
            top()->type = XML_RPC_STRING;
        } else if (element == "boolean") {
            const string value = chomp(_cdata);
            top()->boolean = (value == "1" || value == "true");
            top()->type = XML_RPC_BOOLEAN;
        } else if (!is_fault && element == "name") {
            _states.push(&top()->xml_struct[_cdata]);
        } else if (!is_fault && element == "value") {
            if (!_states.empty()) {
                _states.pop();  
            }
        }
    
        _cdata.clear();
    }
    

    Note here that they only pop when they encounter a value element. Which means when they encounter a data element, they push the stack, but never pop it, which gets the whole tree desynced and breaks parsing.

    Since this was discovered, most of the service calls have been migrated to use JSON instead of XML. That “solves” the problem, given that the XML parser is broken. But the XML parser is still used for some calls, and the result is that the service being invoked is constrained in how it’s allowed to change its API- it can’t add data fields to certain responses, because this client will break. Everyone hates this, and someday, the XML endpoints will go away. Someday.

    [Advertisement]
    BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

    [ad_2]

    Remy Porter

    Source link

  • NASA Astronauts’ Return From ISS On Boeing Capsule Faces Repeated Delays

    NASA Astronauts’ Return From ISS On Boeing Capsule Faces Repeated Delays

    [ad_1]

    The pair of NASA astronauts who flew Boeing’s Starliner capsule to the International Space Station on June 6 have been delayed from returning several times, with their departure date getting pushed from June 18, to the 22nd, to the 26th, and now an unannounced new date as issues with the capsule continue to crop up. What do you think?

    “Out of all the Boeing headlines this year, this one is somehow the least troubling.”

    Ben Robins, Office Historian

    “Fortunately, there’s lots to do while trapped in space.”

    Nydia Gurbush, Amateur Symbologist

    “I’m sure it’ll just be another 30 minutes.”

    Orville Woods, unemployed

     

    [ad_2]

    Source link

  • “They Don’t See All The Rejection”: Emma Roberts Complains About Being Called A Nepo Baby

    “They Don’t See All The Rejection”: Emma Roberts Complains About Being Called A Nepo Baby

    [ad_1]

    Emma Roberts believes the world has a deep misunderstanding of what it’s like being a nepo baby.

    Daughter of the famous Eric Roberts and niece to Hollywood sweetheart Julia Roberts, the actress said people don’t see the rejection nepo babies face while they carve out their careers in showbiz.

    The 33-year-old star made the comments during her Tuesday, June 25, appearance on the Table for Two with Bruce Bozzi podcast by iHeartMedia.

    “People kind of only see your wins because they only see when you’re on the poster of a movie. They don’t see all the rejection along the way,” she said.

    Emma Roberts peeled back the Hollywood curtains to explain the challenges that come with having famous relatives in showbiz

    Image credits: Emma Roberts / Instagram

    “That’s why I’m always very open about things I’ve auditioned for and haven’t gotten the part for. I think it’s important to talk about – otherwise, people just think everything’s been so great and linear and easy, and no, it’s not at all,” the actress continued. “But, of course, it looks like that to the outside perspective or to the naked eye.”

    The mother-of-one also mentioned that it’s even harder for nepo babies to get chances if people in the industry have had bad experiences with their famous relatives.

    The American Horror Story actress is the daughter of Eric Roberts and niece of Julia Roberts

    Image credits: Emma Roberts / Instagram

    “I think there’s two sides of the coin. People like to say, you know, you have a leg up because you have family in the industry,” she said. “But then, the other side to that is you have to prove yourself more.

    “Also, if people don’t have good experiences with other people in your family, then you’ll never get a chance,” she added.

    Emma made her film debut in 2001, portraying the daughter of Johnny Depp‘s character in Blow. Her career took off in 2004 when, at the age of 13, she landed the starring role in the Nickelodeon series Unfabulous, which established her as a young talent to watch.

    “People just think everything’s been so great and linear and easy, and no, it’s not at all,” said the 33-year-old actress

    In recent years, she continued to impress with her performances in American Horror Story.

    When she appeared on the Tuesday podcast episode, she was promoting her new movie Space Cadet, a NASA-themed comedy premiering globally on July 4, 2024.

    Earlier this year, actress Dakota Johnson sparked fury online over her own nepo baby comments.

    The Fifty Shades of Grey actress said journalists should write about something else when asked about the “nepo baby” label

    “When that first started, I found it to be incredibly annoying and boring,” she said when asked by the Today Show host about the “nepo baby” label in the February interview.

    “If you’re a journalist, then write about something else. That’s just lame,” added the Madame Web actress, born to famous parents Don Johnson and Melanie Griffith.

    [ad_2] Binitha Jacob
    Source link

  • It’s A Bell Pepper

    It’s A Bell Pepper

    [ad_1]

    Veggietales: Obscene Gardening

    submitted by /u/xxJesse_Pinkmanxx
    [comments]

    [ad_2]

    /u/xxJesse_Pinkmanxx

    Source link

  • Don’t Read This Email

    Don’t Read This Email

    [ad_1]

    Evan sent us 545 lines of PHP code from a file called spec_email.php. It appears to participate in sending an email, with a nice big pile of HTML in it. We’re going to take it in a few chunks, because… choices were made.

    It opens with this check, and a few variable declarations:

    if(!empty($_GET['action']) && ($_GET['action'] == 'send') ) {
      $template = implode('', file(DIR_FS_CATALOG . 'email/index.htm'));
      
      $assign = array(
      'BASE' => HTTP_SERVER . DIR_WS_CATALOG,
      'TOPTEXT' => $_POST['txt'],
      'HEADER1' => $_POST['head1'],
      'HEADER2' => $_POST['head2'],
      'HEADER3' => $_POST['head3'],
      );
    

    Note both the $template and $assign variables- these are going to be important.

    But before we play with those, let’s take a look at our first major block of code.

    $table1 = '';
      if(!empty($_POST['directors1'])) {
        $k = 1;
        $tot = 1;
        $data_query = mysql_query("SELECT p.products_price, pd.products_name, pd.products_description, p.products_id, s.specials_new_products_price, p.products_image FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND pd.language_id = '" . $_SESSION['languages_id'] . "' AND p.products_id IN(" . join(",", $_POST['directors1']) . ")");
        $num = mysql_num_rows($data_query);
        while($data = mysql_fetch_assoc($data_query)) {
          $table1 .= '';
          
          if($k == 4 && ($tot != $num)) {
            $table1 .= '';
            $k = 0;
          }
          
          $k++;
          $tot++;
        }
      }
      $table1 .= '
    '; $table1 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '"> . HTTP_SERVER . DIR_WS_CATALOG . 'sp.php?id=' . $data['products_id'] . '" width="100" height="138" alt="" border="0">
    '
    ; $table1 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '">' . '$' . sprintf("%.2f", $data['specials_new_products_price']) . ''; $table1 .= '
    '
    ; $assign['TABLE1'] = $table1;

    This creates an HTML table about “directors”, with several links per row. They’re using the table as a grid layout tool, which normally would be bad, but for emails is still a common thing, as many email clients don’t properly support full HTML.

    Note how the result gets stuffed into $assign['TABLE1'].

    We repeat this for $table2 and $table3, which I’m skipping over right now.

    Then we get this delightful bit:

      foreach($assign as $key => $value) {
        $template = str_replace('{' . $key . '}', $value, $template);
      }
    

    Remember that $template? We do repeated find-and-replaces with everything in our $assign array. This is their home brew templating engine. They make no attempt to be efficient, they just find-and-replace over and over and over again.

    Finally, we can send the email.

      $headers = "From: " . STORE_OWNER . " <" . STORE_OWNER_EMAIL_ADDRESS . ">rn";
      $headers .= "Content-Type: text/html; charset=iso-8859-1rn";
      
      if(!empty($_POST['preview'])) {
        if(!empty($_POST['preview_email'])) {
          
          
          
    
          mail($_POST['preview_email'], $_POST['ttl'], $template, $headers,"-f".STORE_OWNER_EMAIL_ADDRESS);
          
          $message = 'Email sent';
        }
      } elseif(!empty($_POST['real'])) {
        
        $cast_array = array();
        $data_query = mysql_query("SELECT customers_email_address FROM " . TABLE_CUSTOMERS . " WHERE customers_specials = 1");
        while($data = mysql_fetch_assoc($data_query)) {
          array_push($cast_array, $data['customers_email_address']);
        }
        $emails_str = join(",", $cast_array);
        
        $headers .= 'Bcc: ' . $emails_str . "rn";
        mail(STORE_OWNER_EMAIL_ADDRESS, $_POST['ttl'], $template, $headers,"-f".STORE_OWNER_EMAIL_ADDRESS);
      }
    

    If we preview the email, we send it to a preview_email address, otherwise we send it to a real address list of customers. At least they’re doing it in BCC.

    And that’s the end of the if statement which opened this code, but it’s not the end of our work. We also need to output the UI here. This is less of a mess of string concatenation and more of a mess of gigantic PHP blobs of code.

    I’ll share the full code, but there’s one highlight. This is how they populate a drop down list:

    while ($data = tep_db_fetch_array($query)) {
      $sel = 'selected';
      
      if (trim($data['products_name'])) {
        echo ''."n";
      }
    }
    

    Once upon a time, they wanted to make only the first item selected, but they forgot how, so instead they just apply the selected attribute to every item.

    Evan shares that this was implemented by contractors who were very expensive, but also, clearly didn’t care, but also clearly worked very hard on it. Harder than anyone should have, but hey, it’s a lot of code!

    Here is the code in its entirety:

    
    require('includes/application_top.php');
    
    if(!empty($_GET['action']) && ($_GET['action'] == 'send') ) {
      
      $template = implode('', file(DIR_FS_CATALOG . 'email/index.htm'));
      
      $assign = array(
      'BASE' => HTTP_SERVER . DIR_WS_CATALOG,
      'TOPTEXT' => $_POST['txt'],
      'HEADER1' => $_POST['head1'],
      'HEADER2' => $_POST['head2'],
      'HEADER3' => $_POST['head3'],
      );
      
      
      $table1 = '';
      if(!empty($_POST['directors1'])) {
        $k = 1;
        $tot = 1;
        $data_query = mysql_query("SELECT p.products_price, pd.products_name, pd.products_description, p.products_id, s.specials_new_products_price, p.products_image FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND pd.language_id = '" . $_SESSION['languages_id'] . "' AND p.products_id IN(" . join(",", $_POST['directors1']) . ")");
        $num = mysql_num_rows($data_query);
        while($data = mysql_fetch_assoc($data_query)) {
          $table1 .= '';
          
          if($k == 4 && ($tot != $num)) {
            $table1 .= '';
            $k = 0;
          }
          
          $k++;
          $tot++;
        }
      }
      $table1 .= '
    '; $table1 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '"> . HTTP_SERVER . DIR_WS_CATALOG . 'sp.php?id=' . $data['products_id'] . '" width="100" height="138" alt="" border="0">
    '
    ; $table1 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '">' . '$' . sprintf("%.2f", $data['specials_new_products_price']) . ''; $table1 .= '
    '
    ; $assign['TABLE1'] = $table1; $table2 = ''; if(!empty($_POST['directors2'])) { $k = 1; $tot = 1; $data_query = mysql_query("SELECT p.products_price, pd.products_name, pd.products_description, p.products_id, s.specials_new_products_price, p.products_image FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND pd.language_id = '" . $_SESSION['languages_id'] . "' AND p.products_id IN(" . join(",", $_POST['directors2']) . ")"); $num = mysql_num_rows($data_query); while($data = mysql_fetch_assoc($data_query)) { $table2 .= ''; if($k == 4 && ($tot != $num)) { $table2 .= ''; $k = 0; } $k++; $tot++; } } $table2 .= '
    '; $table2 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '"> . HTTP_SERVER . DIR_WS_CATALOG . 'sp.php?id=' . $data['products_id'] . '" width="100" height="138" alt="" border="0">
    '
    ; $table2 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '">' . '$' . sprintf("%.2f", $data['specials_new_products_price']) . ''; $table2 .= '
    '
    ; $assign['TABLE2'] = $table2; $table3 = ''; if(!empty($_POST['directors3'])) { $k = 1; $tot = 1; $data_query = mysql_query("SELECT p.products_price, pd.products_name, pd.products_description, p.products_id, s.specials_new_products_price, p.products_image FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_SPECIALS . " s ON p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id = pd.products_id AND pd.language_id = '" . $_SESSION['languages_id'] . "' AND p.products_id IN(" . join(",", $_POST['directors3']) . ")"); $num = mysql_num_rows($data_query); while($data = mysql_fetch_assoc($data_query)) { $table3 .= ''; if($k == 4 && ($tot != $num)) { $table3 .= ''; $k = 0; } $k++; $tot++; } } $table3 .= '
    '; $table3 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '"> . HTTP_SERVER . DIR_WS_CATALOG . 'sp.php?id=' . $data['products_id'] . '" width="100" height="138" alt="" border="0">
    '
    ; $table3 .= ' . tep_catalog_href_link('product_info.php', 'products_id=' . $data['products_id']) . '">' . '$' . sprintf("%.2f", $data['specials_new_products_price']) . ''; $table3 .= '
    '
    ; $assign['TABLE3'] = $table3; foreach($assign as $key => $value) { $template = str_replace('{' . $key . '}', $value, $template); } $headers = "From: " . STORE_OWNER . " <" . STORE_OWNER_EMAIL_ADDRESS . ">rn"; $headers .= "Content-Type: text/html; charset=iso-8859-1rn"; if(!empty($_POST['preview'])) { if(!empty($_POST['preview_email'])) { mail($_POST['preview_email'], $_POST['ttl'], $template, $headers,"-f".STORE_OWNER_EMAIL_ADDRESS); $message = 'Email sent'; } } elseif(!empty($_POST['real'])) { $cast_array = array(); $data_query = mysql_query("SELECT customers_email_address FROM " . TABLE_CUSTOMERS . " WHERE customers_specials = 1"); while($data = mysql_fetch_assoc($data_query)) { array_push($cast_array, $data['customers_email_address']); } $emails_str = join(",", $cast_array); $headers .= 'Bcc: ' . $emails_str . "rn"; mail(STORE_OWNER_EMAIL_ADDRESS, $_POST['ttl'], $template, $headers,"-f".STORE_OWNER_EMAIL_ADDRESS); } } ?> public
    "-//W3C//DTD HTML 4.01 Transitional//EN"> echo HTML_PARAMS; ?>> "Content-Type" content="text/html; charset="> <span class="hljs-meta"><?php </span?> <span class="hljs-keyword">echo</span> TITLE; <span class="hljs-meta">?></span></span> "stylesheet" type="text/css" href="includes/stylesheet.css"> "0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> require(DIR_WS_INCLUDES . 'header.php'); ?> "0" width="100%" cellspacing="2" cellpadding="2">
    "" valign="top">"0" width="" cellspacing="1" cellpadding="1"class="columnLeft"> php require(DIR_WS_INCLUDES . 'column_left.php'); ?> table>td> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading">php echo HEADING_TITLE; ?>td> <td class="pageHeading" align="right">php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>td> tr> table>td> tr> <tr> <td> <form action="=tep_href_link(FILENAME_SPEC_EMAIL, 'action=send');?>" method="post"> if(!empty($message)) { echo'

    '

    . $message . ''; } $cur_day = date("j"); $cur_month = date("n"); $cur_year = date("Y"); $dow = date('w'); if($dow == 0) { $dow = 7; } $dow1 = $dow-1; $week1_begin = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1,$cur_year)); $week1_end = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+6,$cur_year)); $week2_begin = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+7,$cur_year)); $week2_end = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+6+7,$cur_year)); $week3_begin = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+7+7,$cur_year)); $week3_end = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+6+7+7,$cur_year)); $week4_begin = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+7+7+7,$cur_year)); $week4_end = date("Y/m/d", mktime(0,0,0,$cur_month,$cur_day-$dow1+6+7+7+7,$cur_year)); $data_week[] = array('id' => '', 'text' => 'All'); $data_week[] = array('id' => '1', 'text' => 'This Week (' . $week1_begin . ' - ' . $week1_end . ')'); $data_week[] = array('id' => '2', 'text' => 'Next Week (' . $week2_begin . ' - ' . $week2_end . ')'); $data_week[] = array('id' => '3', 'text' => 'Week 3 (' . $week3_begin . ' - ' . $week3_end . ')'); $data_week[] = array('id' => '4', 'text' => 'Week 4 (' . $week4_begin . ' - ' . $week4_end . ')'); if(!empty($_POST['week'])) { $date_begin = ${'week' . intval($_POST['week']) . '_begin'}; $date_begin = str_replace('/', '-', $date_begin); $date_end = ${'week' . intval($_POST['week']) . '_end'}; $date_end = str_replace('/', '-', $date_end); $from_filter = ", " . TABLE_SPECIALS_PERIODS . " sp "; $where_filter = " and p.products_id = sp.products_id and sp.date_start = '" . $date_begin . "' and sp.date_end = '" . $date_end . "'"; } ?>
    class="main">Show Me: td> <td>=tep_draw_pull_down_menu('week', $data_week, $week, ' onChange=this.form.submit(); ');?>td> tr> <tr> <td class="main">Email Title: td> <td><input type="text" name="ttl" value="=$ttl;?>" size="75">td> tr> <tr> <td class="main">Text At Top: td> <td>=tep_draw_fckeditor('txt','800','300', $txt);?>td> tr> <tr> <td colspan="2">&nbsp;td> tr> <tr> <td class="main">Heading 1: td> <td><input type="text" name="head1" value="=$head1;?>" size="75">td> tr> <tr> <td>td> <td class="main"> <table> php $directors1 = $_POST['directors1']; if(empty($directors1)) $directors1 = array(-1); if(isset($directors1) && (count($directors1) > 0) ) { $query = tep_db_query("SELECT pd.products_id, pd.products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE pd.language_id = '" . $_SESSION['languages_id'] . "' and pd.products_id IN(" . join(",",$directors1) . ") ORDER BY pd.products_name"); } ?>
    class="main"> Movies under this heading: <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main"> <SELECT name="directors1[]" multiple style="width:250px; height:120px"> php while ($data = tep_db_fetch_array($query)) { $sel = 'selected'; if (trim($data['products_name'])) { echo ''."n"; } } ?> class="main" valign="middle"> echo '&nbsp;&nbsp;'; echo tep_draw_input_field('director_left2right1','>>',' onclick="copyToList('directorslist1[]','directors1[]'); selectAll('directors1[]');"',false,'button'); echo '&nbsp;&nbsp;<br>&nbsp;&nbsp;'; echo tep_draw_input_field('director_right2left1','<<',' onclick="copyToList('directors1[]','directorslist1[]'); selectAll('directors1[]');"',false,'button'); echo '&nbsp;&nbsp;'; ?> td> <td class="main"> <div id="director_search"> if($browser == 'IE') { ?> "directorslist1[]" multiple style="width:250px; height:120px" onkeyup="if(event.keyCode == 13){ copyToList('directors1[]','directorslist1[]'); selectAll('directors1[]'); document.forms['search'].directors_search.value=''; document.forms['search'].directors_search.focus();}" onKeyPress="if(event.keyCode == 9) { selectNext('directorslist1[]'); return false;}"> } $specials_query_raw = "select p.products_id, pd.products_name, pd.products_alt_title, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, s.expires_date, p.am_orelease_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s" . $from_filter . " where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' /*and s.status = '1'*/" . $where_filter . " order by s.specials_date_added DESC"; $specials_query = tep_db_query($specials_query_raw); while ($data = tep_db_fetch_array($specials_query)) { if (trim($data['products_name']) && !in_array($data['products_id'], $directors1) ) { echo ''."n"; } } ?>
    "2">  class="main">Heading 2: td> <td><input type="text" name="head2" value="=$head2;?>" size="75">td> tr> <tr> <td>td> <td class="main"> <table> php $directors2 = $_POST['directors2']; if(empty($directors2)) $directors2 = array(-1); if(isset($directors2) && (count($directors2) > 0) ) { $query = tep_db_query("SELECT pd.products_id, pd.products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE pd.language_id = '" . $_SESSION['languages_id'] . "' and pd.products_id IN(" . join(",",$directors2) . ") ORDER BY pd.products_name"); } ?> class="main"> Movies under this heading: <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main"> <SELECT name="directors2[]" multiple style="width:250px; height:120px"> php while ($data = tep_db_fetch_array($query)) { $sel = 'selected'; if (trim($data['products_name'])) { echo ''."n"; } } ?> class="main" valign="middle"> echo '&nbsp;&nbsp;'; echo tep_draw_input_field('director_left2right2','>>',' onclick="copyToList('directorslist2[]','directors2[]'); selectAll('directors2[]');"',false,'button'); echo '&nbsp;&nbsp;<br>&nbsp;&nbsp;'; echo tep_draw_input_field('director_right2left2','<<',' onclick="copyToList('directors2[]','directorslist2[]'); selectAll('directors2[]');"',false,'button'); echo '&nbsp;&nbsp;'; ?> td> <td class="main"> <div id="director_search"> if($browser == 'IE') { ?> "directorslist2[]" multiple style="width:250px; height:120px" onkeyup="if(event.keyCode == 13){ copyToList('directors2[]','directorslist2[]'); selectAll('directors2[]'); document.forms['search'].directors_search.value=''; document.forms['search'].directors_search.focus();}" onKeyPress="if(event.keyCode == 9) { selectNext('directorslist2[]'); return false;}"> } $specials_query_raw = "select p.products_id, pd.products_name, pd.products_alt_title, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, s.expires_date, p.am_orelease_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s" . $from_filter . " where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' /*and s.status = '1'*/" . $where_filter . " order by s.specials_date_added DESC"; $specials_query = tep_db_query($specials_query_raw); while ($data = tep_db_fetch_array($specials_query)) { if (trim($data['products_name']) && !in_array($data['products_id'], $directors2) ) { echo ''."n"; } } ?> "2">  class="main">Heading 3: td> <td><input type="text" name="head3" value="=$head3;?>" size="75">td> tr> <tr> <td>td> <td class="main"> <table> php $directors3 = $_POST['directors3']; if(empty($directors3)) $directors3 = array(-1); if(isset($directors3) && (count($directors3) > 0) ) { $query = tep_db_query("SELECT pd.products_id, pd.products_name FROM " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE pd.language_id = '" . $_SESSION['languages_id'] . "' and pd.products_id IN(" . join(",",$directors3) . ") ORDER BY pd.products_name"); } ?> class="main"> Movies under this heading: <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main"> <SELECT name="directors3[]" multiple style="width:250px; height:120px"> php while ($data = tep_db_fetch_array($query)) { $sel = 'selected'; if (trim($data['products_name'])) { echo ''."n"; } } ?> class="main" valign="middle"> echo '&nbsp;&nbsp;'; echo tep_draw_input_field('director_left2right3','>>',' onclick="copyToList('directorslist3[]','directors3[]'); selectAll('directors3[]');"',false,'button'); echo '&nbsp;&nbsp;<br>&nbsp;&nbsp;'; echo tep_draw_input_field('director_right2left3','<<',' onclick="copyToList('directors3[]','directorslist3[]'); selectAll('directors3[]');"',false,'button'); echo '&nbsp;&nbsp;'; ?> td> <td class="main"> <div id="director_search"> if($browser == 'IE') { ?> "directorslist3[]" multiple style="width:250px; height:120px" onkeyup="if(event.keyCode == 13){ copyToList('directors3[]','directorslist3[]'); selectAll('directors3[]'); document.forms['search'].directors_search.value=''; document.forms['search'].directors_search.focus();}" onKeyPress="if(event.keyCode == 9) { selectNext('directorslist3[]'); return false;}"> } $specials_query_raw = "select p.products_id, pd.products_name, pd.products_alt_title, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price, s.expires_date, p.am_orelease_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s" . $from_filter . " where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' /*and s.status = '1'*/" . $where_filter . " order by s.specials_date_added DESC"; $specials_query = tep_db_query($specials_query_raw); while ($data = tep_db_fetch_array($specials_query)) { if (trim($data['products_name']) && !in_array($data['products_id'], $directors3) ) { echo ''."n"; } } ?> "2">  class="main" colspan="2">Preview Email, Send To: <input type="text" name="preview_email" value="=$preview_email;?>"><input type="submit" name="preview" value="Sent Preview">td> tr> <tr> <td class="main" colspan="2">&nbsp;td> tr> <tr> <td class="main" colspan="2"><input type="submit" name="real" value="Send Real Email To Specials List">td> tr> table> form> td> tr> <tr> <td>php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?>td> tr> table>td> tr> table> php require(DIR_WS_INCLUDES . 'footer.php'); ?> <br> body> html> php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

    [ad_2]

    Remy Porter

    Source link