本文整理汇总了PHP中Adherent::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP Adherent::getView方法的具体用法?PHP Adherent::getView怎么用?PHP Adherent::getView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Adherent
的用法示例。
在下文中一共展示了Adherent::getView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start_box
}
// Static objects
$adherent = new Adherent($db);
$accountstatic = new Account($db);
/*
* Actions
*/
/*
* View
*/
llxHeader('', $langs->trans("ListOfSubscriptions"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
if ($msg) {
print $msg . '<br>';
}
if (!empty($date_select)) {
$result = $adherent->getView('cotisationYear', array("key" => (int) $date_select));
} else {
$result = $adherent->getView('cotisationYear');
}
$title = $langs->trans("ListOfSubscriptions");
if (!empty($date_select)) {
$title .= ' (' . $langs->trans("Year") . ' ' . $date_select . ')';
}
print '<div class="row">';
print start_box($titre, "twelve", "16-Money.png");
$i = 0;
$obj = new stdClass();
print '<div class="datatable">';
print '<table class="display dt_act" id="cotisation_datatable" >';
// Ligne des titres
print '<thead>';
示例2: Adherent
$langs->load("companies");
$langs->load("members");
/*
* View
*/
llxHeader('', $langs->trans("Members"), 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
$staticmember = new Adherent($db);
print_fiche_titre($langs->trans("MembersArea"));
print '<table border="0" width="100%" class="notopnoleftnoright">';
$var = True;
$Adherents = array();
$AdherentsAValider = array();
$MemberUpToDate = array();
$AdherentsResilies = array();
$AdherentType = array();
$result = $staticmember->getView('tag', array("group" => true));
if (count($result->rows)) {
foreach ($result->rows as $aRow) {
$AdherentType[$aRow->key] = $aRow->value;
}
}
$now = dol_now();
$doc->_id = "_temp_view";
$doc->map = "function(doc) {\n var now = Math.round(+new Date()/1000);\n var status = 0;\n\n if(doc.class && doc.class==\"Adherent\"){\n if(doc.last_subscription_date_end && doc.Status == 1) {\n if(doc.last_subscription_date_end < now)\n status = \"expired\";\n else\n status = \"actived\";\n }\n else\n status= doc.Status;\n\n if(doc.Tag.length > 0) {\n for(var idx in doc.Tag) {\n emit([doc.Tag[idx],status], 1);\n }\n }\n\n }\n}";
$doc->reduce = "function(keys, values) {\n return sum(values)\n}";
$result = $staticmember->storeDoc($doc);
if (count($result->rows)) {
foreach ($result->rows as $aRow) {
$Adherents[$aRow->key[0]][$aRow->key[1]] = $aRow->value;
}
}
示例3: array
$obj->aoColumns[$i]->bUseRendered = false;
$obj->aoColumns[$i]->bSearchable = true;
$obj->aoColumns[$i]->fnRender = $object->datatablesFnRender("tag", "url", array("url" => $_SERVER["PHP_SELF"] . '?id='));
$i++;
print '<th class="essential">';
print $langs->trans('Total');
print '</th>';
$obj->aoColumns[$i]->mDataProp = "nb";
$obj->aoColumns[$i]->sDefaultContent = 0;
$i++;
print '</tr>';
print '</thead>';
print '<tfoot>';
print '</tfoot>';
print '<tbody>';
$result = $object->getView('tag', array("group" => true));
if (count($result->rows) > 0) {
foreach ($result->rows as $aRow) {
$nb = $aRow->value;
$tmp_id = $aRow->key;
print "<tr>";
print '<td>';
print $tmp_id;
print '</td>';
print '<td>';
print $tmp_id . '</td>';
print '<td align="right">' . $nb . '</td>';
print "</tr>";
$i++;
}
}