示例#1
0
         $xml .= add_XML_value("credential_" . $credential_num++, $credential_array['credential']);
     }
 }
 $xml .= "<project>";
 $xml .= add_XML_value("id", $project_array['id']);
 $xml .= add_XML_value("name", $project_array['name']);
 $xml .= add_XML_value("emailbrokensubmission", $project_array['emailbrokensubmission']);
 $labelavailableids = $Project->GetLabels(7);
 // Get the labels for the last 7 days
 $labelids = $LabelEmail->GetLabels();
 $labelavailableids = array_diff($labelavailableids, $labelids);
 foreach ($labelavailableids as $labelid) {
     $xml .= "<label>";
     $xml .= add_XML_value("id", $labelid);
     $Label->Id = $labelid;
     $xml .= add_XML_value("text", $Label->GetText());
     $xml .= "</label>";
 }
 foreach ($labelids as $labelid) {
     $xml .= "<labelemail>";
     $xml .= add_XML_value("id", $labelid);
     $Label->Id = $labelid;
     $xml .= add_XML_value("text", $Label->GetText());
     $xml .= "</labelemail>";
 }
 $xml .= "</project>";
 $sql = "SELECT id,name FROM project";
 if ($User->IsAdmin() == false) {
     $sql .= " WHERE public=1 OR id IN (SELECT projectid AS id FROM user2project WHERE userid='{$userid}' AND role>0)";
 }
 $projects = pdo_query($sql);
示例#2
0
         $xml .= add_XML_value('credential_' . $credential_num++, $credential_array['credential']);
     }
 }
 $xml .= '<project>';
 $xml .= add_XML_value('id', $project_array['id']);
 $xml .= add_XML_value('name', $project_array['name']);
 $xml .= add_XML_value('emailbrokensubmission', $project_array['emailbrokensubmission']);
 $labelavailableids = $Project->GetLabels(7);
 // Get the labels for the last 7 days
 $labelids = $LabelEmail->GetLabels();
 $labelavailableids = array_diff($labelavailableids, $labelids);
 foreach ($labelavailableids as $labelid) {
     $xml .= '<label>';
     $xml .= add_XML_value('id', $labelid);
     $Label->Id = $labelid;
     $xml .= add_XML_value('text', $Label->GetText());
     $xml .= '</label>';
 }
 foreach ($labelids as $labelid) {
     $xml .= '<labelemail>';
     $xml .= add_XML_value('id', $labelid);
     $Label->Id = $labelid;
     $xml .= add_XML_value('text', $Label->GetText());
     $xml .= '</labelemail>';
 }
 $xml .= '</project>';
 $sql = 'SELECT id,name FROM project';
 if ($User->IsAdmin() == false) {
     $sql .= " WHERE public=1 OR id IN (SELECT projectid AS id FROM user2project WHERE userid='{$userid}' AND role>0)";
 }
 $projects = pdo_query($sql);