. * * ------------------------------------------------------------------------ * DESCRIPTION: * ------------------------------------------------------------------------ * This library tells the PHP4 session handler to write to a MySQL database * instead of creating individual files for each session. * * Create a new database in MySQL called "sessions" like so: * * CREATE TABLE sessions ( * sesskey char(32) not null, * expiry int(11) unsigned not null, * value text not null, * PRIMARY KEY (sesskey) * ); * * ------------------------------------------------------------------------ * INSTALLATION: * ------------------------------------------------------------------------ * Make sure you have MySQL support compiled into PHP4. Then copy this * script to a directory that is accessible by the rest of your PHP * scripts. * * ------------------------------------------------------------------------ * USAGE: * ------------------------------------------------------------------------ * Include this file in your scripts before you call session_start(), you * don't have to do anything special after that. */ $SESS_DBHOST = "scottflodin.duckdns.org"; /* database server hostname */ $SESS_DBUSER = "scottflodin"; /* database user */ $SESS_DBPASS = "nidolf"; /* database password */ $SESS_DBNAME = "totalca_main"; /* database name */ $SESS_DBHOST = "localhost"; /* database server hostname */ $SESS_DBUSER = "totalca"; /* database user */ $SESS_DBPASS = "j5#8Cu4a"; /* database password */ $SESS_DBNAME = "totalca_main"; /* database name */ $SESS_DBH = ""; $SESS_LIFE = (3600 * 24 * 365); // (1 hour) * (24 hours) * (365 days) session_set_cookie_params($SESS_LIFE); function sess_open($save_path, $session_name) { global $SESS_DBHOST, $SESS_DBNAME, $SESS_DBUSER, $SESS_DBPASS, $SESS_DBH; if (! $SESS_DBH = mysql_connect($SESS_DBHOST, $SESS_DBUSER, $SESS_DBPASS)) { echo "
  • Can't connect to $SESS_DBHOST as $SESS_DBUSER"; echo "
  • MySQL Error: ", mysql_error() . ' - SESSION duck'; die; } if (! mysql_select_db($SESS_DBNAME, $SESS_DBH)) { echo "
  • Unable to select database $SESS_DBNAME" . ' - SESSION duck'; die; } return true; } function sess_close() { return true; } function sess_read($key) { global $SESS_DBH, $SESS_LIFE; $qry = "SELECT value FROM sessions WHERE sesskey = '".$key."'"; $qid = mysql_query($qry, $SESS_DBH); if (list($value) = mysql_fetch_row($qid)) { return $value; } return false; } function sess_write($key, $val) { global $SESS_DBH, $SESS_LIFE; $expiry = time() + $SESS_LIFE; $value = addslashes($val); $qry = "INSERT INTO sessions VALUES ('$key', $expiry, '$value')"; $qid = mysql_query($qry, $SESS_DBH); if (! $qid) { $qry = "UPDATE sessions SET expiry = $expiry, value = '".$value."' WHERE sesskey = '".$key."'"; $qid = mysql_query($qry, $SESS_DBH); } return $qid; } function sess_destroy($key) { global $SESS_DBH; $qry = "DELETE FROM sessions WHERE sesskey = '".$key."'"; $qid = mysql_query($qry, $SESS_DBH); session_unset(); // FLODIN added 2004_09_20 global $session_expired; // FLODIN added 2005_07_26 $session_expired = 1; // FLODIN added 2004_09_20 return $qid; } function sess_gc($maxlifetime) { global $SESS_DBH; $qry = "DELETE FROM sessions WHERE expiry < " . time(); //$qid = mysql_query($qry, $SESS_DBH); //return mysql_affected_rows($SESS_DBH); } session_set_save_handler( "sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc"); ?> California Politics and People | TotalCapitol

    Below is the latest TotalCapitol.com news e-mail, sent at 5:59 pm Nov. 18:

    »CLICK HERE to sign up to receive e-mails like this every day.

    Latest California news - Nov. 18, 2:59 pm

    California-style dominance eludes Democrats nationwide
    2:31 pm - CalWatchdog
      At a moment of unprecedented dominance in California, Democrats woke up on Election Day to a painfully changed national landscape, raising sharp questions about how poorly their approach to
    In this article: Kamala Harris, Gavin Newsom, Anthony Rendon,
    »Comment on this article

    Paying for public retirees has never cost L.A. taxpayers more. And that's after pension reform
    1:35 pm - Los Angeles Times
    Los Angeles officials often boast about how they stemmed the rising cost of employee pensions, an expense that has hobbled cash-strapped cities throughout California. Former Mayor Antonio Villaraigosa said changes he oversaw in 2011 and 2012, which ...
    In this article: Eric Garcetti, Antonio Villaraigosa,
    »Comment on this article

    Farewell dinner sends Chino Mayor Dennis Yates off on next adventure (probably includes fishing)
    1:17 pm - Inland Daily Bulletin
    CHINO >> Out-going Chino Mayor Dennis Yates was given a farewell retirement dinner and roast Thursday night for his years of service to the community.The event, attended by residents, fellow officials and members of the business community, was held ...
    In this article: Fred Aguiar, Nancy Pelosi,
    »Comment on this article

    Officials: Drought kills 102 million trees in California
    1:07 pm - Sacramento Bee
    The California drought has killed more than 102 million trees in a die-off of forests that increases the risk of catastrophic wildfires and other threats to humans, officials said Friday. … Click to Continue »
    In this article: Tom Vilsack,
    »Comment on this article

    Attorney general nominee Jeff Sessions wants to hold the line on legal immigration, too
    1:05 pm - Sacramento Bee
    Republican Sen. Jeff Sessions of Alabama is the hardest of Capitol Hills hard-core conservatives, a former prosecutor and failed judicial nominee whose sternly worded views on immigration, drugs, gun rights … Click to Continue »
    In this article: Dianne Feinstein, illegal immigration, Loretta Lynch, Barack Obama, Senate Republicans,
    »Comment on this article

    Taxes get higher on newly legalized pot as California cities and counties move to take their own cut
    12:45 pm - Los Angeles Times
    As the marijuana industry celebrates the passage of an initiative legalizing recreational marijuana in California, more sobering news came from local elections, where voters in 37 counties and cities including Long Beach, San Diego and San ...
    In this article: Robert Garcia,
    »Comment on this article

    Trump to meet Saturday with Sacramento first lady Michelle Rhee
    11:05 am - Sacramento Bee
    Donald Trump will meet on Saturday with Sacramento first lady Michelle Rhee, considered to be in the running for secretary of education. Jason Miller, communications director for Trumps transition team, … Click to Continue »
    In this article: Hillary Clinton, Kevin Johnson, Michelle Rhee, Mitt Romney,
    »Comment on this article

    In Donald Trump's America, will California replace Texas as chief antagonist?
    10:52 am - Los Angeles Times
    Essential Politics: Democrats boast they've picked up another seat in Legislature, statewide uncounted ballots dips below 3.5 million Nov. 18, 2016, 11:18 a.m. This is Essential Politics, our daily look at California political and government news. ...
    In this article: Kamala Harris, Gavin Newsom, Alex Padilla, Anthony Rendon,
    »Comment on this article

    Trump court pick could be consequential to California Teachers Association
    9:32 am - CalWatchdog
    While it may not be immediately apparent, Donald Trumps victory in last weeks presidential election has deep implications for the balance of political power in California. Because of his win,
    In this article: California Teachers Association, Fair Political Practices Commission,
    »Comment on this article

    Chicago O'Hare airport workers plan Thanksgiving strike
    9:26 am - CNN - CNNMoney.com
    Hundreds of workers at Chicago O'Hare International Airport are planning to strike during the Thanksgiving holiday, one of the busiest times at one of the country's busiest airports.
    In this article: SEIU,
    »Comment on this article

    Trump Names Benghazi Zealot His CIA Director
    9:10 am - Mother Jones
    On Friday morning, President-elect Donald Trump named Rep. Mike Pompeo (R-Kans.), a member of the House Intelligence Committee with a history of hardline positions and controversial statements, to be his CIA chief. Pompeo, a lawyer and former Army ...
    In this article: George W. Bush, Hillary Clinton, John McLaughlin, Adam Schiff,
    »Comment on this article

    CalWatchdog Morning Read - November 18
    8:34 am - CalWatchdog
    LAO: State could withstand mild recession Newsom calls for higher-ed “sanctuary campuses” CA is the new Texas Border Patrol union likes Trump’s wall idea Covered California prepares for Trump Good
    In this article: Legislature, Gavin Newsom,
    »Comment on this article

    Letters: You're forgetting the separation of powers
    8:00 am - Orange County Register - Editorial
    Re: For those who fear Trump, theres only one option [Opinion, Nov. 17]: In my opinion, Erwin Chemerinskys column is a bunch of What ifs. What if Hillary Clinton had been elected and put Loretta Lynch, Eric Holder and Barack...
    In this article: Erwin Chemerinsky, Hillary Clinton, Loretta Lynch, Barack Obama,
    »Comment on this article

    California rejected Trump but could benefit anyway
    8:00 am - Orange County Register - Editorial
    On Jan. 20, when Donald Trump takes his hand off the Bible and picks up the phone, he could cause a near-seismic upheaval in California just by changing some federal rules and implementing new policies. Let me break the news to you gently: it ...
    In this article: Anthony Rendon, Susan Shelley, water,
    »Comment on this article

    A business strategy for the governor's race
    8:00 am - Orange County Register - Editorial
    Now that the 2018 race for governor of California is in full swing with the release of the first Field Poll on the contest, as the race shapes up business interests will consider how to position themselves in a multi-candidate field. Conventional...
    In this article: John Chiang, Gray Davis, Kevin Faulconer, Field Poll, Joel Fox, Eric Garcetti, Gavin Newsom, Richard Riordan, Bill Simon, Tom Steyer, Ashley Swearengin, Antonio Villaraigosa, Steve Westly,
    »Comment on this article

    Gloria Romero for Trump's Secretary of Education
    6:04 am - Fox & Hounds Daily
    New presidents usually appoint at least one member of the other party to a cabinet post to advance bipartisanship and national unity. A perfect choice for President-elect Donald Trump would be Gloria Romero, a former Democratic majority leader in ...
    In this article: Legislature, Gloria Romero,
    »Comment on this article

    Housing Affordability and California's Future  
    6:03 am - Fox & Hounds Daily
    As housing prices continue to rise in California, a significant number of our residents are being denied access to the American dream of homeownership. Today, only about one-third of our fellow citizens can afford to buy a median-priced home in the ...
    »Comment on this article

    Invest California's Pension Funds in Water and Energy Infrastructure
    6:02 am - Fox & Hounds Daily
    We wanted flying cars, instead we got 140 characters. Peter Thiel, in his 2011 manifesto What Happened to the Future. Anyone living in California whos paying attention knows what venture capitalist Thiel meant. While a handful of Silicon Valley ...
    In this article: Joel Kotkin,
    »Comment on this article

    CA Officials Poised To Blunt Trump On Deportation
    6:01 am - Fox & Hounds Daily
    If Donald Trump aims to significantly reduce the presence of undocumented and unlawful immigrants in California, he will face staunch opposition. From the municipal to statewide level, officials have come out strongly against the prospect of ...
    In this article: Kamala Harris, Alex Padilla,
    »Comment on this article

    Trump Proved He Could Win. Now He Must Show He Can Govern
    6:00 am - Fox & Hounds Daily
    Shock and Revulsion. Joy and jubilation. Two clashing views of a nation irreconcilably divided, one segmentof the population mourning for itself, the other experiencing the realization of a moment that could not have been predicted just months ago. ...
    In this article: Barbara Boxer, George W. Bush, Hillary Clinton,
    »Comment on this article

    AM Alert: Will Ami Bera pull away from Scott Jones?
    6:00 am - Sacramento Bee
    With most 2016 political races long decided, California lawmakers-in-waiting are preparing for the year ahead. But some candidates are still stuck in a mail-in-ballot induced limbo. For Rep. Ami Bera, … Click to Continue »
    In this article: Ami Bera, California Teachers Association, Gray Davis, EdVoice, Bob Hertzberg, Darrell Issa, Jim Miller, Richard Pan, Arnold Schwarzenegger,
    »Comment on this article

    The Take: Michelle Rhee and Trump's confusing Cabinet candidates
    5:31 am - Sacramento Bee - Opinion
    Good morning. On behalf of The Sacramento Bees editorial board, welcome to The Take, your opinion-politics newsletter. Please sign up for it here. Take your pick Just when California was … Click to Continue »
    In this article: Hillary Clinton, Newt Gingrich, Kevin Johnson, Nancy Pelosi, Michelle Rhee, Mitt Romney, John Shirey, Mac Taylor,
    »Comment on this article

    L.A. prepares to help undocumented immigrants during a Trump presidency
    5:00 am - Los Angeles Times
    Good morning. It is Friday, Nov. 18. One of the stretching portraits from Disneylands Haunted Mansion is going up for auction. Heres what else is happening in the Golden State: TOP STORIES A possible solution Nearly 10,000 California National Guard ...
    In this article: Eric Garcetti, Duncan Hunter, Michelle Rhee, Herb Wesson,
    »Comment on this article

    UC students disrupt regents' meeting with protests against possible tuition hike
    4:00 am - Los Angeles Times - Education
    In a brief butrowdy standoff, University of California students furious about a possible tuition hike momentarily shut down the regents meeting Thursday and were ordered by police to leave or face arrest. More than 80 students waved signs, stood up ...
    In this article: PPIC, Bonnie Reiss,
    »Comment on this article

    PG&E guilty in San Bruno blast*
    7:12 am - AroundTheCapitol.com - The Roundup
    <p><strong><a href="http:* <p><b>GEORGE AVALOS</b> with <strong>The Mercury News</strong>: "PG&E must face sentencing in January on its criminal convictions linked to a fatal ...
    In this article: Sean Clegg, Hillary Clinton, Fair Political Practices Commission, Kamala Harris, Thelton Henderson, Gavin Newsom, Barack Obama,
    »Comment on this article

    Did money buy California ballot measure contests?
    12:01 am - Sacramento Bee
    California voters passed a measure on Election Day urging state politicians to use their authority to limit corporate and special interest spending in elections. Then they sided with the campaign … Click to Continue »
    In this article: Jim DeBoo, Field Poll, Legislature, Jessica Levinson, Charles Munger, Gavin Newsom, Proposition 5, referendum, Roger Salazar,
    »Comment on this article

    More state news headlines at http://totalcapitol.com
    - // STRIPE FORM