当前位置: 首页>>代码示例>>PHP>>正文


PHP Call::Save方法代码示例

本文整理汇总了PHP中Call::Save方法的典型用法代码示例。如果您正苦于以下问题:PHP Call::Save方法的具体用法?PHP Call::Save怎么用?PHP Call::Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Call的用法示例。


在下文中一共展示了Call::Save方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function post_edit($url, $post_data, $arr_headers = array(), &$http_code, $evid, $tablename, $_entry, $old_link_edit, $user_data)
 {
     //$auth=getAuthCode($user_data[0],$user_data[1]);     // 190509 not working if not ssl on server
     $this->login();
     $auth = $this->fAuth;
     $header = array();
     $header[] = "MIME-Version: 1.0";
     $header[] = "Accept: text/xml";
     $header[] = "Authorization: GoogleLogin auth=" . $auth;
     $header[] = "Content-length: " . strlen($_entry);
     $header[] = "Content-type: application/atom+xml";
     $header[] = "Cache-Control: no-cache";
     $header[] = "Connection: close \r\n";
     $header[] = $_entry;
     $link = $old_link_edit;
     $entry1 = curlToHost($link, 'PUT', $header);
     $entry = $entry1;
     $checkok = explode("<link rel='edit' type='application/atom+xml' href='", $entry);
     $checkok1 = explode("'/>", $checkok[1]);
     $checkok_url = $checkok1[0];
     if ($checkok_url != '') {
         if ($tablename == "tasks") {
             $mmod = new Task();
             $mmod1 = new Task();
         }
         if ($tablename == "meetings") {
             $mmod = new Meeting();
             $mmod1 = new Meeting();
         }
         if ($tablename == "calls") {
             $mmod = new Call();
             $mmod1 = new Call();
         }
         $newtbname = $tablename . "_cstm";
         $cs1 = "delete from {$newtbname} where id_c='{$evid}'";
         $cs2 = "insert into {$newtbname} (id_c,google_response_c) values ('{$evid}',\"{$entry}\")";
         debugg("<br>update ev1 >" . $cs1);
         debugg("<br>update ev1 >" . $cs2);
         $r = $mmod->db->query($cs1);
         $r = $mmod->db->query($cs2);
         $s1 = explode("<entry xmlns", $entry);
         $s2 = explode("</entry>", $s1[1]);
         $xmlstr = "<entry xmlns" . $s2[0] . "</entry>";
         $xmlparse =& new ParseXML();
         $xml = $xmlparse->GetXMLTree($xmlstr);
         $old_id = $xml['ENTRY'][0]['ID'][0]['VALUE'];
         $old_published = $xml['ENTRY'][0]['PUBLISHED'][0]['VALUE'];
         $old_updated = $xml['ENTRY'][0]['UPDATED'][0]['VALUE'];
         $old_link_alt = $xml['ENTRY'][0]['LINK'][0]['ATTRIBUTES']['HREF'];
         $old_link_self = $xml['ENTRY'][0]['LINK'][1]['ATTRIBUTES']['HREF'];
         $old_link_edit = $xml['ENTRY'][0]['LINK'][2]['ATTRIBUTES']['HREF'];
         $old_author = $xml['ENTRY'][0]['AUTHOR'][0]['NAME'][0]['VALUE'];
         $old_email = $xml['ENTRY'][0]['AUTHOR'][0]['EMAIL'][0]['VALUE'];
         $mmod1->retrieve($evid);
         $mmod1->old_id_c = $old_id;
         $mmod1->old_published_c = $old_published;
         $mmod1->old_updated_c = $old_updated;
         $mmod1->old_link_alt_c = $old_link_alt;
         $mmod1->old_link_self_c = $old_link_self;
         $mmod1->old_link_edit_c = $old_link_edit;
         $mmod1->old_author_c = $old_author;
         $mmod1->old_email_c = $old_email;
         $mmod1->Save();
         debugg("<br>***** Event update ok");
     } else {
         debugg("<br>***** Error updating event .. response " . print_r($entry));
     }
 }
开发者ID:Terradex,项目名称:sugar,代码行数:68,代码来源:MyCurl.php


注:本文中的Call::Save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。